简体   繁体   中英

Adjust JQuery Slider min/max

I am using the jQuery dual slider from here:

http://hmelyoff.github.com/jslider/

however, that doesn't seem to allow me to reinitialize/change the min/max (from/to in this case) of the slider after I get back some new data through ajax. Does anyone know of a visually appealing dual slider that allows me to do so? Otherwise I'd probably have to end up modifying the slider above, and I am hoping not to do that.

Thanks!

Have you checked out the jQuery UI Slider? http://jqueryui.com/demos/slider/#range

Get or set the max option, after init.

//getter
var max = $( ".selector" ).slider( "option", "max" );

//setter
$( ".selector" ).slider( "option", "max", 7 );

And

Get or set the min option, after init.

//getter
var min = $( ".selector" ).slider( "option", "min" );

//setter
$( ".selector" ).slider( "option", "min", -7 );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM