Ok, I got this to work, although the animation isn't smooth.
Code:
$("#slider1").slider({
max:350,
min:100,
step:10,
value:100,
slide: function(event, ui) {
$("#amount").val(ui.value);
$(this).find('.ui-slider-handle').html('<div class="sliderControl-label v-labelCurrent">£'+ui.value+'</div>');
} ,
change :function(event, ui) {
$("#amount").val(ui.value);
$(this).find('.ui-slider-handle').html('<div class="sliderControl-label v-labelCurrent">£'+ui.value+'</div>');
}
});
var val = 100;
var timer = setInterval(function() {
if (val <= 200) {
$("#slider1").slider("value", val);
val += 10;
}
else {
clearInterval(timer);
}
}, 200);
It would be highly appreciated if anyone can make the animation smooth.
Cheers,
Jonny