Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery slider problem reaching min and max values

I have a jQuery slider initialized and then dynamically set min max values depeding on the contents of a json-request. Steps av even 100, min a max are recalculated to even hundred, most of the case somewhere between 300 and 4800.

The slider values and settings are fine, but when I move the handle I can't get it all the way out to the ends, it stops a few steps from min/max values. Why is that?

I've tried all sorts of things, nothing works. I ended up adding 200 at the top value and subtracting 200 in the lower and to compensate, but that's is a hack and not a solution.

like image 493
pean Avatar asked Jan 20 '10 12:01

pean


1 Answers

In your 'slide' callback, try using ui.value to get the value. This solved my problem. See jQuery UI slider - can't slide to 0 except don't go by the answer, go by the comment to the answer.

like image 149
Ben Avatar answered Dec 20 '22 10:12

Ben