How do I add a Marker to a jQuery UI Slider?
Posted
by
Bijan
on Stack Overflow
See other posts from Stack Overflow
or by Bijan
Published on 2010-12-14T02:44:13Z
Indexed on
2010/12/27
16:54 UTC
Read the original article
Hit count: 221
I have a simple jQuery UI slider that has a numerical range from 25 to 35. It works fine and the default value is 28. I'm hoping to add a simple tick mark to the slider to indicate that 28 is where the default is. Is there a simple way to add an indicator?
$('#cycle_length').slider({
range: "min",
value: 28,
min: 25,
max: 35,
step: 1,
slide: function( event, ui ) {
$( "#amount" ).val( ui.value );
}
});
$( "#amount" ).val( $( "#cycle_length" ).slider( "value" ) );
© Stack Overflow or respective owner