Hello jQuery Community,
I'm currently facing a problem regarding the jQuery Mobile Slider.
I modified the Slider a bit. I am using an array with values the slider can take.
For example: [220, 250, 500, 900]
If you slide to 245 the slider will automatically slide to 250 because it's the nearest value.
While this works great with integers I'm having problems with floating numbers. For example if I take this one:
var m2 = [19.5, 16.5, 14.5, 15, 10, 13];
my slider behaves in a strange way.
When instantiating the slider with 19.5 as value everything works fine. When I slide to 16.5 the right value is shown (via console.log()) but the sliders actual value is at 17. jQuery is automatically rounding the values which I find pretty strange.
You can see the result here. The first slider is working perfectly while the second one is behaving strange.
I've pasted the code here:
I hope anyone has got a clue for me how to fix that :)
Thanks in advance and best regards,
Thomas