jQuery each() with a delay

前端 未结 5 2005
执念已碎
执念已碎 2021-02-07 08:33

So, I would like an element to fade in and wait half a second, then fade the next in etc...

My code:

$(\'.comment\').each(function() {                 
          


        
5条回答
  •  北海茫月
    2021-02-07 09:13

    try something like this

    $(this).find('#results').children().each(function(index){
            $(this).delay(500 * index).slideDown(500);
    })
    

提交回复
热议问题