Animate jquery ui slider handle to specific value on pageload
Hi Newbie here. I'm having problems getting a slider to animate to a certain value. The value is within the handle. I want the handle to automatically move on pageload to a specific value. The value has to increment up to the value though.
I've created a script in where I'm animating the handle but I can't get the values to increment accordingly. Here is my current script.
Slider1:
- $("#slider1").slider({
- max:350,
- min:100,
- step:10,
- value:100,
- animate: 'true',
- animate: 6000,
- slide: function(event, ui) {
- $("#amount").val(ui.value);
- $(this).find('.ui-slider-handle').html('<div class="sliderControl-label v-labelCurrent">£'+ui.value+'</div>');
-
- update();
-
- } ,
- change :function(event, ui) {
- $("#amount").val(ui.value);
- $(this).find('.ui-slider-handle').html('<div class="sliderControl-label v-labelCurrent">£'+ui.value+'</div>');
-
- update();
- }
- });
- $("#slider1").slider("value", 200);
- update();
On pageload, the value should start at 100 and then automatically increment in 10's up to 200. Although, 200 just appears.
Any help would be greatly appreciated. Cheers.