Hello!
Faced a problem. I use the following code:
$(function() { var min_cost = $("input[name='min-cost']").val(); console.log(min_cost); //3828 var max_cost = $("input[name='max-cost']").val(); console.log(max_cost); //25289 $( "#slider-range" ).slider({ range: true, min: min_cost, max: max_cost, values: [ min_cost, max_cost ], slide: function( event, ui ) { $( "#mincost" ).val(ui.values[ 0 ]); $( "#maxcost" ).val(ui.values[ 1 ]); } }); $( "#mincost" ).val( $( "#slider-range" ).slider( "values", 0 ) ); $( "#maxcost" ).val( $( "#slider-range" ).slider( "values", 1 ) ); });
Both sliders are at the minimum value and do not want to move. What could be the problem? If you do not use variables to set the range and the minimum and maximum values, then everything works.