Posted By

ninjamuk on 10/22/09


Tagged

plugin jquery delay


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

morvan
adambundy


Jquery Delay Plugin


 / Published in: JavaScript
 

URL: http://blindsignals.com/index.php/2009/07/jquery-delay/

Allows for delay functionality in effects, etc.

$("#navpanel").delay(2000).animate({top:"-250px"}, {easing:"swing"});

  1. $.fn.delay = function( time, name ) {
  2.  
  3. return this.queue( ( name || "fx" ), function() {
  4. var self = this;
  5. setTimeout(function() { $.dequeue(self); } , time );
  6. } );
  7.  
  8. };

Report this snippet  

You need to login to post a comment.