Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 838
G.S Avatar asked Jan 19 '23 06:01

G.S


1 Answers

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

$("#yourSlider").attr("min", 4).slider("refresh");
like image 176
Frédéric Hamidi Avatar answered Jan 29 '23 09:01

Frédéric Hamidi