Create ordered list with heading and content

Description

The following code shows how to create ordered list with heading and content.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.5.2.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css">
<script type='text/javascript'
  src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script>
<style type='text/css'>
.oi-li-heading {<!--   www .  ja va 2s  .c  o m-->
  font-size: 16px;
  font-weight: bold;
  margin: .6em 0;
}

.oi-li-desc {
  font-size: 12px;
  font-weight: normal;
  margin: -.5em 0 .6em;
  padding-left: 1.5em;
}
</style>
</head>
<body>
  <div data-role="page" data-theme="b" id="jqm-home">
    <div data-role="content">
      <ol data-role="listview">
        <li><span> <span class="oi-li-heading">heading 1</span>
            <br /> <span class="oi-li-desc">description 1</span>
        </span></li>
        <li><span> <span class="oi-li-heading">heading 2</span>
            <br /> <span class="oi-li-desc">description 2</span>
        </span></li>
        <li><span> <span class="oi-li-heading">heading 3</span>
            <br /> <span class="oi-li-desc">description 3</span>
        </span></li>
      </ol>
    </div>
  </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