Jquery UI Slider problem (and solution)…
I was having a problem with the slider control where it would jump to to 100% position seemingly randomly. After much hacking around with the slider control source code I found that a certain test in the control was treating the new value I was passing in as a string instead of a number. The test was coming up true and the function was returning the max slider value instead of my new value (which was less than max so the test should have failed).
So my code now says:
pos=pos*1; // force pos to be numeric
$( “#slider” ).slider( “value”, pos ); // Set new slider position
I guess that just because it ‘looks’ like a number does not mean it will be treated like one. Lesson learned!