O'Reilly logo

Building UIs with Wijmo by Yuguang Zhang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a ListView widget

The ListView acts as a list of links for navigation. jQuery mobile applies the necessary styles to make the list mobile-friendly. Once a list item is tapped on, the link content is loaded through AJAX and inserted into the page. This improves the user perception as they do not see a blank screen. A ListView is created by setting the data-role attribute of an HTML list to listview with each list item containing a link:

<div data-role="page"> <div data-role="content"> <ul data-role="listview" data-autodividers="true" data-theme="c"> <li><a href="http://wijmo.com/demos/">Wijmo Demos</a></li> <li><a href="http://wijmo.com/wiki/index.php/ListView">WijmoListViewDocumentation</a></li> <li><a href="http://jquerymobile.com/demos/1.2.0/docs/lists/docs-lists.html">jQuery ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required