Hello stackoverflow Community,
I am currently facing a problem with the jQuery mobile slider. I have strongly modified the slider. It's working with arrays that contain values the slider is allowed to take.
If you slide to a position that is not in the array it will slide to the nearest value in the array.
My problem now is: The array contains floating point numbers
var m2 = [19.5, 16.5, 14.5, 15, 10, 13];
If my slider needs to slide to 16.5, it instead slides to 17. The actual value of the slider is indeed 16.5 but the bar slides to 17. I don't think the problem is caused by my code since all the values are outputted correctly.
My question now is: Did anyone have a similar problem with the slider? Are there any possible workarounds (or even fixes) for that problem?
I put up the script. You can access it here: http://workidtest.de/ui/new.html
The slider which is affected is the one in the middle.
I also put up the code here: http://pastie.org/5171015
Thanks in advance, Thomas