I am initializing a jquery ui slider that has for example a value of .01, a min of .01, and a max of 5000. My issue is that the max is stopping at 4999.990000000001. Can you see what I am doing wrong?
$( "#sliderModal" ).slider({
value:r.min_price/100,
min: r.min_price/100,
max: r.max_price/100,
step:0.01,
slide: function( event, ui ) {
$( "#amountModal" ).val(ui.value );
}
});
r.max_price/100
and see what you get. Anyway, you've fallen vitcim to floating point arithmetic – adeneo Jan 8 '15 at 22:47