Jquery Delay Plugin


/ Published in: JavaScript
Save to your folder(s)

Allows for delay functionality in effects, etc.

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


Copy this code and paste it in your HTML
  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. };

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.