Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

jQuery Mobile Rangeslider initSelector Option

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


Initializing the Rangeslider with the specified initSelector option.

$( "Selector" ).rangeslider({
    initSelector: "div.custom"

Setting the initSelector option.

$( "Selector" ).rangeslider( 
    "option", "initSelector", "div.custom" );

Getting the initSelector option.

var initSelector = $( "Selector" )
    .rangeslider( "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 Rangeslider 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 Rangeslider initSelector Option</h3>
            <div data-role="rangeslider" id="divID">
                <label for="range-slider-1">Rangeslider:</label>
                <input name="range-slider-1" min="0" 
                       max="100" value="30" type="range">
                <label for="range-slider-2">Rangeslider:</label>
                <input name="range-slider-2" min="0" 
                       max="100" value="80" type="range">
            <input type="button" id="Button" 
                   value="Value of the initSelector option">
            <div id="log"></div>
        $(document).ready(function () {
                initSelector: ":jqmData(role='rangeslider')"
            $("#divID").rangeslider("option", "initSelector", 
            $("#Button").on('click', function () {
                var a = $("#divID")
                    .rangeslider("option", "initSelector");




My Personal Notes arrow_drop_up
Last Updated : 14 May, 2022
Like Article
Save Article
Similar Reads
Related Tutorials