Add badge to Listview item

Description

The following code shows how to add badge to Listview item.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.9.1.js'></script>
<script type="text/javascript"
  src="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.js"></script>
<link rel="stylesheet" type="text/css"
  href="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.css">
</head><!--  w  w w. j  a v  a2 s. c  o m-->
<body>
  <div data-role="content" style="text-align: center">
    <ul data-role="listview" data-count-theme="c" data-inset="true">
      <li>
        <div data-role="collapsible">
          <h4>Heading</h4>
          <ul data-role="listview">
            <li><a href="#">List item 1</a></li>
            <li><a href="#">List item 2</a></li>
            <li><a href="#">List item 3</a></li>
          </ul>
        </div>
      </li>
      <li><a href="#">Outbox <span class="ui-li-count">0</span></a></li>
      <li><a href="#">Drafts <span class="ui-li-count">4</span></a></li>
      <li><a href="#">Sent <span class="ui-li-count">328</span></a></li>
      <li><a href="#">Trash <span class="ui-li-count">62</span></a></li>
    </ul>
  </div>
</body>
</html>

Click to view the demo





















Home »
  jQuery Mobile »
    Example »




Button
Button Event
Button Icon
Button Text
Checkbox
Collapsible
Date
Dialog
Event
Footer
Form
Header
Icon
Input
Layout
Listview
Listview Divider
Listview Item
Loader
mobile_settings
Navbar
Page
Page Event
Popup
Radio
Select
Slider
Switch
Textarea
Theme