Return to Snippet

Revision: 19360
at October 22, 2009 07:28 by ninjamuk


Initial Code
$.fn.delay = function( time, name ) {

    return this.queue( ( name || "fx" ), function() {
        var self = this;
        setTimeout(function() { $.dequeue(self); } , time );
    } );

};

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

Initial Description
Allows for delay functionality in effects, etc.

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

Initial Title
Jquery Delay Plugin

Initial Tags
plugin, jquery

Initial Language
JavaScript