Opened 15 years ago
Closed 15 years ago
#2197 closed bug (fixed)
jqueryUI Slider plugin - Multiple handle BUG
Reported by: | alexo | Owned by: | paul |
---|---|---|---|
Priority: | major | Milestone: | 1.2.3 |
Component: | ui | Version: | 1.2.2 |
Keywords: | jquery ui plugin slider | Cc: | [email protected]… |
Blocked by: | Blocking: |
Description
I'm using the demo code of the slider jquery-UI plugin to reproduce the bug. Below is a markup for a slider with multiple handle.
<div id='example3' class='ui-slider-2' style="margin: 40px;"> <div class='ui-slider-handle'></div> <div class='ui-slider-handle' style="left: 188px;"></div> </div> <span id="slider-min"></span> <span id="slider-max"></span>
Here the slider is constructed.
$('#example3').slider({ minValue: 0, maxValue: 100, slide: function(e,ui) { $("#slider-min").text( ui.values[0] ); $("#slider-max").text( ui.values[1] ); } });
When the handler is moved, the span values are updated. The problem is that the second handler have the wrong value (0 instead of maxValue) when the first handler is moved for the first time.
Thank you!
Regards, Alex Objelean.
Change History (2)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Hi, this is fixed in the new version of slider, which works quite different. To get values for handles, you must call $(el).slider('value', handleIndex) to get the value. Good luck!
Note: See
TracTickets for help on using
tickets.
The problem seems to be the initialization of the curValue property in prepareCallbackObj function.
original:
Here is my quick&dirty hack for this situation:
This is not quite a bug, but it proves that the slider plugin lacks startValues option for multiple handle slider.
Thank you! Regards, Alex Objelean