JQuery fadeOut(function(){fadeIn});

后端 未结 4 507
闹比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:37

    Here's a simple helper function to help you do this.

    function fade(thisIn, callback){
        boxes.not(thisIn).filter(':visible').delay(5000).fadeOut('slow', function(){
            thisIn.fadeIn('slow', callback);
        });
    }
    

    jsFiddle

提交回复
热议问题