Load List Items dynamically with JQuery

后端 未结 6 1819
伪装坚强ぢ
伪装坚强ぢ 2021-01-14 13:58

I\'d like to structure my JQuery to fade in each individual item at a time. Here\'s an example of the behavior, and here\'s the JQuery I have so far:

$(\'li\         


        
6条回答
  •  攒了一身酷
    2021-01-14 14:42

    There is another way to fade in elements after each other:

    $.fn.fadeInNext = function(delay) {
        return $(this).fadeIn(delay,function() {
            $(this).next().fadeInNext();
        });
    };
    
    $('li').hide().first().fadeInNext(1000);
    

提交回复
热议问题