View Single Post
Old 02-01-2013, 09:09 AM   PM User | #4
jonnystudent
New to the CF scene

 
Join Date: Jan 2013
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
jonnystudent is an unknown quantity at this point
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
jonnystudent is offline   Reply With Quote