Skip to content
Related Articles
Open in App
Not now

Related Articles

jQuery Mobile Listview splitIcon Option

Improve Article
Save Article
  • Last Updated : 23 Dec, 2021
Improve Article
Save Article

jQuery Mobile is a set of HTML5 based user system interaction widget toolbox used for various purposes build on top of jQuery. It is designed to build fast and responsive sites accessible to mobile, tabs, and desktops. jQuery Listview is a widget used to create beautiful lists. It is a simple and responsive Listview used to view the unordered lists.

In this article, we will be using the jQuery Mobile ListView splitIcon option. If a list item has a second link, then the splitIcon appears on the right-hand side of the list item. This displays that there is some content inside the list item. The default value of splitIcon is of type carat-r.

Note: It is necessary to have a second link in order to split-icon appear else it won’t display, rather it will display the normal icon.



Initialize the listview with the splitIcon option specified:

    splitIcon: "star",

Get or set the splitIcon option, after initialization:

// Getter
var splitIcon = $(".selector").listview("option", "splitIcon");
// Setter
$( ".selector" ).listview( "option", "splitIcon", "star" );

There are multiple icons from jQuery Mobile. The whole list is as follows:

action audio check grid power
alert back clock heart recycle
arrow-d bars cloud home  refresh
arrow-d-l bullets comment info search
arrow-d-r calendar delete location shop
arrow-l camera edit lockmail star
arrow-r carat-d eye minus tag
arrow-u carat-l forbidden navigation user
arrow-u-l carat-r forward phone video
arrow-u-r carrot-u gear plus  

CDN Link: First, add jQuery Mobile scripts needed for your project.

<link rel=”stylesheet” href=”” />
<script src=””></script>
<script src=””></script>

Example: In this example, we have a listview with one of the list items having two links. On clicking the link, the popup opens with a message and two options either to proceed to the link or close the pop-up. The pop-up is also from the jQuery Mobile UI library. The splitIcon used is of star type.


<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content=
        "width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href=
    <script src=
    <h1 style="color:green">
    <h3>jQuery Mobile Listview splitIcon Option</h3>
    <ul class="items" data-role="listview">
            <a href=
                Data Structures</a>
            <a href=
                Interview preparation
            <a href="#java" data-rel="popup" 
                Java Programming
            <a href="">
                Java Programming
    <div data-role="popup" id="java" 
        style="max-width:280px; padding-bottom:2rem;">
            Open the Java Tutorial link by clicking 
            the Open button given below to learn 
            java from GeeksforGeeks.
        <a href="" 
            class="ui-shadow ui-btn ui-corner-all
                     ui-btn-inline ui-mini">
        <a href="" data-rel="back" class="ui-shadow 
        ui-btn ui-corner-all ui-btn-inline ui-mini">
            splitIcon: "star"



My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!