Saturday, March 8, 2014

jquery mobile removing the ellipsis inside the list items(with in anchor tag and without anchor tag) using css:

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.css">-->
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>

<script>
$(document).ready(function(){
  //Disable ajax nav

    $.mobile.ajaxLinksEnabled = false;

});
</script>

<!-- <script src="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js"></script> -->
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>
<style>

/* css for removing ellipsis content inside the li item */
.ui-listview > .ui-li-static, .ui-listview > .ui-li-divider, .ui-listview > li > a.ui-btn {
    display: block;
    margin: 0;
    overflow: hidden;
    position: relative;
    text-align: left;
    text-overflow: ellipsis;   
    white-space: normal;
    }

    /* css for removing ellipsis content inside the li item with in the anchor tag */
    .ui-li .ui-btn-text a.ui-link-inherit {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}
</style>
</head>
<body>

<div data-role="page" id="pageone">
  <div  data-role="header">
    <h1><a href="#pageonew">Buttons1</a></h1>
  </div>

  <div data-role="content">
  <ul data-role="listview" data-inset="true" data-theme="d">
      <li>
        Speak with your agent or Enroll online. You receive an initial discount of up to 5% on your Speak with your agent or Enroll online.
        You receive an initial discount of up to 5% on your Speak with your agent or Enroll online. You receive an initial discount of up to 5% on your State Farm insurance premium just for participating.
        </li>
        </ul>
 
 
<ul data-role="listview" data-inset="true" data-theme="d">
      <li>
       <a href=""> Speak with your agent or Enroll online. You receive an initial discount of up to 5% on your Speak with your agent or Enroll online.
        You receive an initial discount of up to 5% on your Speak with your agent or Enroll online. You receive an initial discount of up to 5% on your State Farm insurance premium just for participating.</a></strong>
        </li>
        </ul>
       
        <ul data-role="listview" data-inset="true" data-theme="d">
          <li>
       <a href=""> Speak with your agent or Enroll online. You receive an initial discount of up to 5% on your Speak with your agent or Enroll online.
        You receive an initial discount of up to 5% on your Speak with your agent or Enroll online. You receive an initial discount of up to 5% on your State Farm insurance premium just for participating.</a></strong>
        </li>
    </ul>
  </div>

  <div data-role="footer">
    <h1>Footer Text</h1>
  </div>
</div>




</body>
</html>

No comments:

Post a Comment