Web Design, 3d & More - Aaron Newton 

Adding a Pause Between Effects Using JQuery

$.fn.pause = function(duration) {    $(this).animate({ dummy: 1 }, duration);    return this;};

Call it like this :

$("#mainImage").pause(5000).fadeOut();

Note: you don't need a callback.

This is an incredibly helpful and concise function for adding a 'pause' type function to JQuery. It means that you can wait for the designated time before running any effect - neat.

Posted by Aaron Newton 

Comments (0)

Leave a comment...



Contact Us   |