开发者

How to make the jQuery slider only slide when dragging the handlers?

开发者 https://www.devze.com 2023-01-12 06:40 出处:网络
I\'m trying to use a multiple开发者_Go百科 handlers slide like jQuery example, but I what to be able to drag the part between the handlers.

I'm trying to use a multiple开发者_Go百科 handlers slide like jQuery example, but I what to be able to drag the part between the handlers.

jQuery example: http://jqueryui.com/demos/slider/range.html


This has been prototyped by davidpadbury.

If you want to do it manually, register a custom handler to the slide event and set the value of the handlers by accessing them like this:

$('#slide-id').slider('value', index);

Check the source of the range slider example, this can be implemented similar to the setting of the dollar values in that example. However, this will only work easily if you want to have a permanently fixed range (i.e. losing the ability to adjust the range by the handlers). If you want to preserve that feature, check the implementation by David Padbury.

0

精彩评论

暂无评论...
验证码 换一张
取 消