Page 1 of 1

dynamically adjust slide min and max

Posted: Mon Feb 18, 2013 4:35 pm
by New Mobile Guy

Is there a way to set the min and max value for a slider in javascript?

In the UI, the values are called "Max. Value" and "Min. Value". Can I set these dynamically?


dynamically adjust slide min and max

Posted: Mon Feb 18, 2013 6:41 pm
by Maryna Brodina

Hello!

To get current min/max value use:

var sliderMax = Tiggzi("mobilesliderName").attr("max");
var sliderMin = Tiggzi("mobilesliderName").attr("min");

to set new min/max value use:

Tiggzi("mobilesliderName").attr("max", 1000);
Tiggzi("mobilesliderName").attr("min", 500);
Tiggzi("mobilesliderName").slider("refresh");

and here is the short record of described above lines:

Tiggzi("mobilesliderName").attr("max", 1000).attr("min", 500).slider("refresh");