O'Reilly logo

jQuery and JavaScript Phrasebook by Brad Dayley

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 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.

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