/ Published in: jQuery
                    
                                        
A small plugin that you can use in the jQuery chain to delay the next in queue. For those using a jQuery library pre 1.4 (v1.4 + has .delay() ).
$('.notice').fadeIn().idle(2000).fadeOut('slow');
                $('.notice').fadeIn().idle(2000).fadeOut('slow');
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
(function($){
jQuery.fn.idle = function(time)
{
var o = $(this);
o.queue(function()
{
setTimeout(function()
{
o.dequeue();
}, time);
});
};
})(jQuery);
Comments
 Subscribe to comments
                    Subscribe to comments
                
                