javascript - jQuery Slider Min Value -
i know there min value in jquery's slider. however, there way can make slider handle stop moving under value? there variable can change make happen?
note: slider vertical
basically, if minimum 20, don't want slider handle going under 20.
well can check in slide
functionality below:
$(function() { $( "#slider-range" ).slider({ orientation: "vertical", range: false, value:20, slide: function( event, ui ) { if (ui.value < 20) // corrected return false; else $( "#amount" ).val( ui.value ); } }); $( "#amount" ).val( $( "#slider-range" ).slider( "value" ) ); });
Comments
Post a Comment