$(document).ready(function() { $( "#slider-prix" ).slider({ range: true, min: 25, max: 305, values: [25, 305], step: 5, slide: function( event, ui ) { $( "span#range" ).html("" + ui.values[0] + " €" + ui.values[1] + " €"); }, change: function(event, ui) { $.ajax({ url: "/index.php?action=setSession", dataType: "html", type : "POST", data: { "filtreMin" :ui.values[0], "filtreMax" :ui.values[1] }, success: function() { window.location.reload(); } }); } }); });