首页 > 代码库 > delay()延迟

delay()延迟

jquery的delay()方法:

delay() 方法对队列中的下一项的执行设置延迟

封装方法:

    $.fn.fadeInWithDelay = function(){
        var delay = 0;
        return this.each(function(){
            $(this).delay(delay).animate({opacity:1}, 200);
            delay += 100;
        });
    };

调用:

$(".has-meeting-record li").fadeInWithDelay();

 

delay()延迟