jQuery-ui slider animation when setting value programmatically
问题 I'm using a jQuery-ui slider and some buttons for a quick selection of a little set of values. When the user clicks one of these buttons, the slider is set to the corresponding value through the .slider method: $("#mySlider").slider("value", myValue); This works fine, but I'd like to see the sliding animation. I tried with $("#mySlider").slider({value:myValue, animate:true}) but it doesn't work as expected, since the animation is only enabled when, later, the user clicks on the slider bar.