My JQuery slider’s value getter is not working.
var value = $("#slider").slider("option", "value")
It does not return the right value. My slider’s range is from 1 to 5, if that helps. It returns odd values that do not correspond to the actual value. If I move it to the end and back again, instead of going 1, 2, 3, 4, 5, 4, 3, 2, 1, like it should, it does 0, 0, 2, 3, 4, 5, 4, 3, 2. The 5 isn’t even at the end, when I get to the end it says 4 but when I slide it one back it says 5!
When are you trying to query these values?
If it’s during the
slidecallback you’ll get the previous value, not the current, and you should use theui.valueparameter instead.