Possible Duplicate:
Jquery Continuously Loop Animation
I want this animation to restart when the div timer reaches 940px. So far I have this:
$('.timer').animate({'width':940}, {queue:false, duration:5000, easing: 'linear'});
if ($('.timer').width() == 940){
$('.timer').width() == 0;
$('.timer').animate({'width':940}, {queue:false, duration:5000, easing: 'linear'});
}
Restarting animated loop:
Do the animation, hard reset, animate again: