G.S
G.S

Reputation: 257

min value of slider in jquery mobile

I am creating an app using phonegap+jquery mobile.I have three radio buttons and a slider whose min and max values are set to 0 and 10 respectively. Now, if I would select some radio button and there would be a change event. I want to set the min value of slider to some other value such as 3 or 4 on this change event. I want to do this dynamically. I am able to change the 'value' parameter of slider, but how can i change the min value of slider?

Upvotes: 4

Views: 1514

Answers (1)

Frédéric Hamidi
Frédéric Hamidi

Reputation: 262939

You can set the min attribute of the underlying <input> element and refresh the slider:

$("#yourSlider").attr("min", 4).slider("refresh");

Upvotes: 9

Related Questions