Have this self-made slider: http://jsfiddle.net/wyc3P/4/
What it does: takes min and max values in seconds and converts them to a minute:second format during slide.
Goal is to set maximum value between handles to be exactly 40 seconds.
I thought it worked fine, until I moved right handle to match 1:00 – 1:40, but it showed 1:00 – 1:41 instead. However if you then move left handle all the way to the left, it shows correctly 0:00 – 0:40.
Please help to resolve coding mistakes. =)
The sliders are actually staying 40 apart (maximum), the problem is your minute/second calculations underneath use the original
uivalues passed in to the function, even if you set a new value:You would need to update the
ui.valuestoo:http://jsfiddle.net/wyc3P/8/