Minimum slider value in jQuery mobile

I am creating an application using phonegap + jquery mobile. I have three switches and a slider whose minimum and maximum values ​​are set to 0 and 10 respectively. Now, if I select some switch and a change event occurs. I want to set the minimum value of the slider to another value, such as 3 or 4 in this change event. I want to do it dynamically. I can change the "value" parameter of the slider, but how to change the value of the minimum value of the slider?

+4
source share
1 answer

You can set the min attribute of the base <input> element and update the slider:

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

Source: https://habr.com/ru/post/1382112/


All Articles