I want to use jquery ui to make a slider with two handles that maintain a minimum space between them. If the left handle tries to cross the right handle, the right handle should be pushed along. And vice-versa. Here’s an example (nevermind the overlapping, that’s not important):
It works so long as the movement is slow but if the mouse moves too fast, it fails in the “pushing” scenario. I think that setting the sliders values from within the ‘slider’ event might be at fault.
This worked. I copied the code from
$.ui.slider.prototype._slideand removed the part that checked if the left handle was greater than the right handle. Works well now.http://jsfiddle.net/Nk8ap/