Using jQuery UI Slider dynamically?

拜拜、爱过 提交于 2019-12-08 19:12:38

So, what you need is to basically change the slider range from 0 to double whatever is entered in the text box? I think you can use the method "option" on the slider such as:

 $("input").change(function (event) {
     var value1 = parseFloat($("input").val());
     var highVal = value1 * 2;
     $("#slider-range-min").slider("option", {"max": highVal, "value": value1});
 });

Edit: here's a fiddle - http://jsfiddle.net/cXYC4/

I'm not sure but this might work: http://flowplayer.org/tools/rangeinput/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!