Jquery Interconnected slider [closed]

岁酱吖の 提交于 2019-12-13 03:13:40

问题


I want to create generic jquery ui slider so that if i pass any number,it should return me that number of interconnected sliders.

If I slide any 1 slider,it should change others.However, the sum of all the sliders must always be 100 at any point of time.

I tried it myself which is working but as soon as the value of slider goes more than 50 and you try to increase the other slider then the total sum of all the sliders becomes greater than 100.

Here is the link of my code.

Can anyone help me please? thanks'


回答1:


ahah you've taken my ugly css for your jsfiddle. I try to do exactly the same thing, look at this: 3 jquery ui slider connected




回答2:


I've done this for a client project and open sourced my solution. It uses noUiSlider instead of jQuery UI Sliders, but if you wanted to modify it, it would not be too difficult. It's not completely polished up yet and I realize this question is a year old, but just in case anyone wants it:

Github: jQuery Interconnected Sliders

It supports locks (which allows you to set a value and then not move it again) and it looks something like this: screenshot



来源:https://stackoverflow.com/questions/10262003/jquery-interconnected-slider

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