Skip to content
Related Articles

Related Articles

jQuery Mobile Listview autodividers Option

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 24 Jan, 2022

jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops.

In this article, we will be using the jQuery Mobile Listview autodividers option. This option is given by the “listview.autodividers” extension and when the value of this option is set to “true”, then dividers are automatically created for the listview items.


Initializing the Listview with the autodividers option.

$( ".selector" ).listview({
  autodividers: true
  • Setting the autodividers option.

    $( ".selector" ).listview( "option", "autodividers", true );
  • Getting the autodividers option.

    var themeClass = $( ".selector" )
        .listview( "option", "autodividers" );

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

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

Example: This example demonstrates the jQuery Mobile Listview autodividers option.


<!doctype html>
<html lang="en">
    <meta charset="utf-8">
    <meta name="viewport" content=
"width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    <script src=
        <div data-role="page">
            <h1 style="color:green;">
            <h3>jQuery Mobile Listview autodividers Option</h3>
            <div id="divID">
                <div role="main" class="ui-content">
                    <ul data-role="listview">
                        <li><a href="index.html">GeeksforGeeks</a></li>
                        <li><a href="index.html">GFG</a></li>
                        <li><a href="index.html">gfg</a></li>
            <input type="button" id="Button" 
                   value="Value of the autodividers Option">
            <div id="log"></div>
        $(document).ready(function () {
                autodividers: true
            $("#divID").listview("option", "autodividers", true);
            $("#Button").on('click', function () {
                var a = $("#divID").listview("option", "autodividers");


jQuery Mobile Listview autodividers Option

jQuery Mobile Listview autodividers Option


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!