Finish one animation then start the other one

后端 未结 8 2068
谎友^
谎友^ 2020-12-03 11:11

I have two divs and two separate links that triggers slideDown and slideUp for the divs.

When one of the divs are slided down and I click the other one, I hide the f

8条回答
  •  無奈伤痛
    2020-12-03 11:50

    Use the second parameter of the function: callback. For example,

    $(this).slideDown( speed, function(){
        $(this).slideUp();
    });
    

提交回复
热议问题