jQuery Mobile List View
jQuery Mobile List View
List views in jQuery Mobile are standard HTML lists; ordered (
-
) and unordered (
- ) so the user can click it:
Example
-
data-role="listview"
- List item m
-
data-role="listview"
- List item
Try it »
For rounded corners and edges of list styles, use the data-inset="true" attribute:
Example
-
data-inset="true"
- element:
Example
Try it »
If you have an alphabetically ordered list (such as a phone book), you can configure it through the
-
or
-
element's data-autodividers="true" attribute to automatically generate item dividers:
Example
Try it »

data-autodividers="true" can be configured to automatically generate item dividers. By default, the generated divider text is the first uppercase letter of the list item text.
More examples
Read-only list
How to create a list without links (it will not be a button and not clickable).Panel
How to insert a panel in a list
Try it »

By default, links in list items automatically become buttons (no need for data-role="button").
List dividers
List items can also be turned into list dividers, used to organize lists and group list items.
To specify a list divider, just add the data-role="list-divider" attribute to the list item
-
).
List view is a powerful feature in jQuery Mobile. It makes standard unordered or ordered lists more widely applicable. The way to apply it is to add the data-role="listview" attribute to a ul or ol tag. Add a link in each item (