Creating a Basic Listview

<ul data-role="listview">   <li><a href="#one">Link 1</a></li>   <li><a href="#two">Link 2</a></li>   <li>Non Linkable Item</li> </ul>

Lists are created by adding the data-role="listview" to a <ul> or <ol> element. jQuery automatically handles formatting the <li> elements into a list form. For <ol> elements, the formatted listview contains the numbering for each line item.

Get jQuery and JavaScript Phrasebook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.