Friday, January 13, 2012

jQuery Mobile: ul element, with data-role="listview"

Example of html <ul> element in jQuery Mobile, with data-role="listview".

jQuery Mobile: ul element of listview

<!doctype html>
<head>
<title>Mobile-Web-App: listview</title>
<meta charset="utf-8">
<meta name = "viewport" content = "width = device-width, height = device-height" />

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>

</head>
<body>

<div data-role="page" id="home">
<div data-role="header">
<h1>jQuery Mobile: listview</h1>
</div>

<div data-role="content">
<ul id="myitems" data-role="listview" data-filter="true" data-inset="true" >
<li><a href="http://jquerymobile.com/">jQuery Mobile</a></li>
<li><a href="http://www.microsoft.com/">Microsoft</a></li>
<li><a href="http://www.google.com/">Google</a></li>
<li><a href="http://www.ibm.com/">IBM</a></li>
</ul>
</div>

<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>

</div>

</body>
</html>


Related article:
- jQuery Mobile: listview with data-filter: insert <li> elements using Javascript code.

No comments:

Post a Comment