Animate jquery ui slider handle to specific value
Posted
by
user1159555
on Stack Overflow
See other posts from Stack Overflow
or by user1159555
Published on 2012-10-24T10:59:19Z
Indexed on
2012/10/24
11:00 UTC
Read the original article
Hit count: 334
I'm trying to animate a jquery UI handle to a specifiv value. My code is this so far.
$("#slider1").slider({
max:350,
min:100,
animate: 'slow',
step:10,
animate: "true",
value: 0,
change: function() {
// This setTimeout will allow the slider to animated correctly.
setTimeout("$('#slider1').slider('value', 200);", 350);
}
slide: function(event, ui) {
$("#amount").val(ui.value);
$(this).find('.ui-slider-handle').html('<div class="sliderControl-label v-labelCurrent">'+ui.value+'</div>');
update();
}
});
$('#slider').slider('value', 200);
How do I make it so that 1) The handle will go to the specific value on page load and 2) The handle can be freely moved after the page has loaded and the animation has finished.
Cheers,
Jonah
© Stack Overflow or respective owner