Hi, I'm looking for a way to make a slider with range, but with a fake
range that always starts from the min value, with only one visible
handle. Adding a second handler and hiding it causes some unwanted
side-effects (impossible to drag visible handle all the way down to
min-value etc).
Visually I've managed to solve it by adding a rangeElement in the
markup, setting it on start() and update its width during the slide().
...
,start: function(e,ui){
this.rangeElement = this.rangeElement || $(this).children('div.ui-
slider-range');
}
, slide: function(e,ui){
this.rangeElement.css('width',ui.handle.css('left'));
}
It's not pretty but it works. Now, the issue is that setting
startValue doesn't trigger any of the reachable methods, it just
updates the position of the handle without propagating to change/start/
stop methods of the object. Which it probably shouldn't, nothing wrong
with that. But in order to update the range, I need to call moveTo()
straight after creating the slider object. not pretty at all. Plus, it
triggers start/stop/change which is unwanted.
My question is:
is there a way to attach functionality to the hidden init_ method of
the object? That way I could both create my rangeElement and position
it to the start value from there...
Or is there a smarter way to accomplish this?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---