Edit This Code:
<!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.5/jquery.mobile-1.4.5.min.css">
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<script>
$(document).on("pagebeforecreate",function(event){
  $(".manipulate").attr("data-inset","true");
});
</script>
</head>
<body>

<div data-role="page" id="pageone">
  <div data-role="header">
    <h1>Header Text</h1>
  </div>

  <div data-role="main" class="ui-content">
    <p>In this example, we style the list below as an inset list during the pagebeforecraete event.</p>
    <ul class="manipulate" data-role="listview">
      <li data-role="list-divider">Europe</li>
      <li><a href="tryit.asp-filename=tryjqmob_event_pagebeforecreate4.html#">Norway</a></li>
      <li><a href="tryit.asp-filename=tryjqmob_event_pagebeforecreate4.html#">Germany</a></li>
      <li data-role="list-divider">Asia</li>
      <li><a href="tryit.asp-filename=tryjqmob_event_pagebeforecreate4.html#">India</a></li>
      <li><a href="tryit.asp-filename=tryjqmob_event_pagebeforecreate4.html#">Thailand</a></li>
      <li data-role="list-divider">Africa</li>
      <li><a href="tryit.asp-filename=tryjqmob_event_pagebeforecreate4.html#">Zimbabwe</a></li>
      <li><a href="tryit.asp-filename=tryjqmob_event_pagebeforecreate4.html#">Uganda</a></li>
    </ul>
  </div>

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

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy