I'm using jQuery 1.2.6 and ui 1.5.2 and am trying to implement a slider with two handles. When one handle moves too close to the other, I want the other handle to move too in order to keep a minimum range.
I found two things that don't necessarily work as they should: 1. When flipping dynamically from one handle to two handles, I used the $('#sliderId').data('slider').options.range = true. This did set the range option to true, but the range div was not shown and ui.range was undefined. 2. When one handle named "low" gets close to the other handle named "high", I used $('#sliderId').slider('moveTo', (low + min range), $ ('#highId'), true) to move the "high" handle away from the "low" handle ensuring that the range is always greater than the minimum. However, the moveTo seems to trigger the slide function which then attempts to move the "low" handle away from the "high" handle. This just causes the whole thing to bounce back and forth rather than one slider to push/nudge the other up or down. Furthermore, the ui.handle flips back and forth between "low" and "high" and from the ui.slider.js code it would seem that the handle is determined by mousedown/mousemove not moveTo. So I don't really care about the 1st issue with the range as I can determine the range using $('#sliderId').slider('value', $('#highId')) - $('#sliderId').slider('value', $('#lowId')), but how can I get around the 2nd issue? Is there a way to suppress moveTo from triggering the start, slide, and change functions? Is there an alternative way of moving the other slider other than using moveTo? Finally, are these bugs? Shouldn't the range be initialized properly if I set it to true? Shouldn't the ui.handle be determined by the handle where the mouse is down?