Refreshing jQuery UI range slider whith new values -
i'd need little please. don't know how assign new values range slider after reloading page.
here html:
<label for="slider-range-price1-value" class="adv-search-label-recherche-detaillee">prix :</label> <span>€</span> <input type="text" id="slider-range-price1-value" readonly class="adv-search-amount-recherche-detaillee" name="slide_prix[]"> <div class="clearfix"></div> <div id="slider-range-price1" data-min="0" data-max="<?php echo $prix_max ?>" class="slider-range-prix"></div>
and js:
$(".slider-range-prix").each( function( index ) { var sliderid = $( ).attr('id'); $( ).slider({ step: 10000, range: true, min: parsefloat($( ).attr("data-min")), max: parsefloat($( ).attr("data-max")), values: [ parsefloat($( ).attr("data-min")), parsefloat($( ).attr("data-max")) ], slide: function( event, ui ) { $( "#" + sliderid + "-value" ).val( ui.values[ 0 ] + " - " + ui.values[ 1 ] ); } }); $( "#" + sliderid + "-value" ).val( $( ).slider( "values", 0 ) + " - " + $( ).slider( "values", 1 ) ); });
i tried code:
$("#slider-range-price1").slider({ values: [xxxx, xxxx], });
but doesn't work.
thank help!
Comments
Post a Comment