Open In App
Related Articles

jQuery Mobile Reflow Table initSelector Option

Improve Article
Save Article
Like Article

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 Reflow Table initSelector option.  The value of this option is a CSS selector string that picks elements on the basis of the value of this option and explicates the stated Reflow Table widgets on every element of the following list.


  • Initializing the Reflow Table with the initSelector option.
$( ".selector" ).table({
     initSelector: ".mytable"
  • Setting the initSelector option.
$( ".selector" ).table( "option", "initSelector", ".mytable" );
  • Getting the initSelector option.
var initSelector = $( ".selector" )
    .table( "option", "initSelector" );

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

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

Example: This example describes the jQuery Mobile Reflow Table initSelector 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 Reflow Table initSelector Option</h3>
            <div data-role="header">
            <div role="main">
                <table data-role="table" id="tableID" data-mode="reflow">
                            <th data-priority="1">Company Name</th>
                            <th data-priority="persist">Website</th>
                            <th data-priority="2">Year</th>
                               <a href="" 
            <input type="button" id="Button" 
                   value="Value of the initSelector Option">
            <div id="log"></div>
        $(document).ready(function () {
                initSelector: ".mytable"
            $("#tableID").table("option", "initSelector", ".mytable");
            $("#Button").on('click', function () {
                var a = $("#tableID").table("option", "initSelector");




Last Updated : 14 May, 2022
Like Article
Save Article
Similar Reads
Related Tutorials