Search and Top Navigation
#2197 closed bug (fixed)
Opened January 20, 2008 11:30AM UTC
Closed February 12, 2008 02:37PM UTC
Last modified February 26, 2009 11:23AM UTC
jqueryUI Slider plugin - Multiple handle BUG
Reported by: | alexo | Owned by: | paul |
---|---|---|---|
Priority: | major | Milestone: | 1.5 |
Component: | ui.core | Version: | 1.2.2 |
Keywords: | jquery ui plugin slider | Cc: | alex.objelean@gmail.com |
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.
Attachments (0)
Change History (4)
Changed January 23, 2008 09:42AM UTC by comment:1
Changed February 12, 2008 02:37PM UTC by comment:2
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!
Changed May 24, 2008 03:39AM UTC by comment:3
milestone: | 1.2.3 |
---|
Milestone 1.2.3 deleted
Changed February 26, 2009 11:23AM UTC by comment:4
milestone: | → 1.5 |
---|
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