After putting in some debug code, it seems the following is happening:
If "low" handle is being moved, when the "high" slider is pushed over
because it's too close to "low", the ui.handle flips to "high". Is
this because moveTo fires the slide function? If so, how can I
suppress that and just move the handle without calling slide or change
functions?
On Oct 30, 3:42 pm, kape <[EMAIL PROTECTED]> wrote:
> I have a slider that has one or two handles depending on some
> settings. When there are two handles, I would like to maintain a
> minimum range between them. So if I have a scale from 0 - 100, two
> handles, "low" and "high", with minimum range 10, when I'm sliding
> "low" towards "high" if abs("high" - "low") < minimum range, I want
> "high" to move higher. If "high" = 100, then I want "low" to have a
> max of 100 - 10. Similarly, if "high" is being moved close to "low" I
> want "low" to move lower but not lower than 0 and therefore, "high"
> shouldn't be lower than 10.
>
> Due to the dynamic nature of the slider I can't use the range=true,
> because sometimes there's only one slider. Instead, I'm using the $
> ().slider('value', "low/high"). I compare the two values and if
> they're less than 10, I use $().slider('moveTo', ui.value - 10, "low")
> or $().slider('moveTo', ui.value + 10, "high') to move the other
> slider. However, as soon as the other slider moves, it calls the same
> method to move its respective other slider. So they just end up
> bouncing back and forth as opposed to pushing one another higher or
> lower.
>
> Any assistance would be greatly appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---