Closed srjsrj closed 11 years ago
Interesting question. I'll look in to it today.
Hi Well ita a very nice and useful plugin. I have one requirement that the slider handle should not overlap and when they are side by side the value of both handles should be same. Any fix for this?
Thanks Jitender
I'd say do this by css. Try moving the handles to either sides.
Thanks for reply, I have modified your plugin a bit, It will working for me with my requirement handles are not overlapping now and the handle value is same when they are side by side but the problem is it is working fine with value 0 to 100 when I am changing value to some other value then the value are not same when they are side by side.What I did is I made one more helpers name overlap; code demo http://jsbin.com/amorup/2/edit
overlap: function(a,b ){
a/b;
return a/b;
},
val1 = api.low ? Math.round(helpers.deScale(api.low.left(), api.options.scale, api.slider.innerWidth())) + Math.round(helpers.overlap(parseFloat($(api.slider).find('.noUi-midBar').css('left')),10)) : false;
val2 = api.up ? Math.round(helpers.deScale(api.up.left(), api.options.scale, api.slider.innerWidth())) - Math.round(helpers.overlap(parseFloat($(api.slider).find('.noUi-midBar').css('right')),10)): false;
When I am changing value I will have to change 2nd parameter accordingly. It is set on 10 now. I want to change it dynamically.
Thanks Jitender
Hi leongersen, I have figure it out and almost there, your plugin with some modification working fine for me but it differ with value 1 at some point. Can you please look into that issue I am also looking solution for it.
This is latest code with bug fixed
v3 supports a 'margin' option that provides this functionality.
Hi Leongerson,
What are the options for non-lineaear one? we are using your plugin and don't want both of them overlapping each other,
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hello. Very cool plugin btw :+1: I need a feature to stop handles when they are side by side. You can see my solution here: http://srj.im/html/remny/acces.html This one is so buggy. http://jsfiddle.net/AcgfJ/ — call functions.
Is there an another way to solve this? Thanks!