Closed alonsoct00 closed 5 years ago
You would have to watch the slideStop
event and return false
if the values cross. You can check value[0] > value[1]
in that function and it should work for your purposes.
Thanks
I updated my script but doesn't works
$(this).on("slideStop", function() {
var rangeVal = $(this).val();
var splitRange = rangeVal.split(',');
var check0 = splitRange[0];
var check1 = splitRange[1];
if (check0 == check1) {
return false;
}
});
please help me
I saw you had opened a stackoverflows question so I will defer to that. Sorry!
I need to apply a limit for both slider-handles in the range control, i.e. do not pass or cross each other... like the jquery slider UI that the both handles stops the slide behavior, and never cross.
https://jqueryui.com/slider/#range
I make a codepen with my code using bootstrap-slider
https://codepen.io/alonsoct00/pen/xojLdE
Thanks