is there a way to tell the queue() method to do not repeat itself for every element?
is there a way to tell the queue() method do not repeat itself for every element?
- $('.video_list li').delay(500)
.animate( {left: move}, 1500)
.queue(function(next){
// do something only one time and do not repeat it for every element!
next();
})
the reason for using queue() is for telling the function inside to queue to run only after the animation is complete.
for example:
- $('.video_list li').queue(function(next){
$('.arrows').unbind('click', moveIt)
next();
})
- .delay(500)
.animate( {left: move}, 1500)
.queue(function(next){
$('.arrows').bind('click', moveIt)
next();
})