JQuery fadeOut(function(){fadeIn});

后端 未结 4 467
闹比i
闹比i 2021-01-21 17:52

I have a problem with my webpage. I have 4 div\'s which should all fade in after the one before fades out. The code I use is:

$(\'.btn\').click(function(){
    $         


        
4条回答
  •  旧巷少年郎
    2021-01-21 18:19

    I'd say try using finish() method:

    $('.btn').click(function(){
        $('#box3').finish().delay(5000).fadeOut('slow', function(){
            $('#box4').fadeIn('slow');
        });
    });
    

    Maybe would be better in your case to use it after delay()

提交回复
热议问题