Jquery UI range Slider values bug -
please help me. code working
$slider.slider({ min: 0 ,max: 500 ,range: true ,values: [0,500] ,step: 10 ,slide: function (event, ui){ $prev.text('₴' + ui.values[0]); $next.text('₴' + ui.values[1]); } });
this code - dont (range slider disabled, place right numbers) :
var minel = 280; var maxel = 495; $slider.slider({ min: minel ,max: maxel ,range: true ,values: [minel,maxel] ,step: 10 ,slide: function (event, ui){ $prev.text('₴' + ui.values[0]); $next.text('₴' + ui.values[1]); } });
have tested code, problem near previous code:
if:
var maxel = 500; var minel = 100;
everything working. not constants, parse elements on page min , max price. code example:
var arr = []; $(".priceeeee").each(function(indx){ arr.push($(this).html()); }); var maxel = arr[0]; var minel = arr[0]; (var = 0; < arr.length; i++) { if (maxel < arr[i]) { maxel = arr[i]; }; if (minel > arr[i]) { minel = arr[i]; }; };
i used parseint parsed numbers.
maxel = parseint(maxel); minel = parseint(minel);
thx 2 @codrin eugeniu fast feedback!
jquery jquery-ui
No comments:
Post a Comment