Response title
This is preview!
I know that we can change the step in short distance between min
and max
and Math round
the UI value to create smooth sliding like
step: .0001,
...
$(".value").text("slider value: " + Math.round(ui.value));
but this is Ok when the step is 1
. How about this case which is 0.25
. Can you please let me know how to make the slider smooteher
$( function() {
var handle = $( "#custom-handle" );
$( "#slider" ).slider({
min:-12,
max:6,
step:0.25,
create: function() {
handle.text( $( this ).slider( "value" ) );
},
slide: function( event, ui ) {
handle.text( ui.value.toFixed(2) );
}
});
} );
© 2013 jQuery Foundation
Sponsored by and others.