Colin

Posted on Friday, January 29, 2010

jQuery Animation: Queue, Stop()

When ".stop()" is used, all specified elements will stop their animation immediately and allow the next queued up animation to execute.

$('li').stop().animate({...code....});

By inserting "queue : false", we can stop the animation from queuing up in the animation buffer.

$('li').animate({...code...},{queue:false},1000);

To combine usage for both methods,

$('li').stop(true).animate({...code...});


Reference Website:
http://tutsvalley.com/tutorials/making-a-cool-thumbnail-effect-with-zoom-and-sliding-captions
http://www.netiblog.com/programming/jquery/turning-off-the-jquery-animation-queue

Labels: , , ,