Gthoma2
Gthoma2

Reputation: 707

How do I make a jQuery Mobile slider's input box non-interactive

I want to make the input box to the left of the jQuery Mobile slider's input box read-only. Right now when a user taps the input box of the widget, this will happen:

slider input box popup

I know how to make the input box disappear completely:

$("#yourPage").live("pageinit", function() {
    $(".ui-slider-input").hide();
});

but I would like to have it stay and update the value of the slider without the user being able to interact with it, only the slider handle and the slider track.

Upvotes: 0

Views: 128

Answers (1)

AtanuCSE
AtanuCSE

Reputation: 8940

You can use read only or disable functionality

$(".ui-slider-input").prop("readonly",true);

$('.ui-slider-input').attr("disabled", true)

Upvotes: 1

Related Questions