Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery Mobile List Content

jQuery Mobile List Content



jQuery Mobile List Icons

By default every list item contains an arrow icon "carat-r" (right arrow). To change this icon you can use the data-icon attribute:

Example

Try it »

Note data-icon="false" will remove the icon.

For a more complete list of jQuery Mobile button icons, visit our jQuery Mobile Icon Reference Manual。


16x16 icons

If you want to add a standard 16x16px icon to your list, you can add a element to the list item and use the "ui-li-icon" class:

Example

Try it »


jQuery Mobile List Thumbnails

For images larger than 16x16px, add a .

jQuery Mobile will automatically scale the image to 80x80px:

Example

Try it »

Add list information using standard HTML:

Example

Try it »


jQuery Mobile List Icons

In the list element use class="ui-li-icon" to add a 16x16px icon:

Example

  • USAclass="ui-li-icon"

    USA

  • Try it »


    Split button

    In jQuery Mobile lists, sometimes you need to perform two different actions on the option content; in that case, you need to split the link button in the option. The way to achieve the split is to add another

  • element inside theelement, which will create a split effect on the page.

    jQuery Mobile automatically sets the second link to a blue arrow icon, and the icon's link text (if any) will be displayed when the user hovers over the icon:

    Example

    Try it »

    Add some pages and dialogs to make links more functional:

    Example

    Try it »


    Bubble numbers

    Bubble numbers are used to display numbers related to list items, such as the number of emails in a mailbox:

    To add a bubble number, use an inline element such as , set the class "ui-li-count" attribute and add the number:

    Example

    Try it »

    **Note:** To display a correct bubble number, you must modify it programmatically. This will be explained in later chapters.


    More examples

    Popup lists
    How to create a popup list

    Change the default link icon of list items
    How to set the default link icon of list items (default is right arrow).

    Collapsible popup list
    How to create a collapsible popup list.

    Collapsible list
    How to create a show/hide list.

    More content formats
    How to create a calendar.