How to run jQuery fadeIn() and slideDown() simultaneously?

前端 未结 7 1561
天涯浪人
天涯浪人 2020-12-13 01:38

I\'ve got a div with display: none; Now I want to show it using both: fadeIn and slideDown simultaneously.

$(this).slideDown({duration: \'slow\', queue: fals         


        
7条回答
  •  伪装坚强ぢ
    2020-12-13 02:22

    start with height:0px and opacity:0; filter: alpha(opacity = 0) then on the action do:

    $(this).stop().animate({
        height: 200,
        opacity: 1
    }, 350);
    

    Change the height (i set to 200) and the duration (i set to 350) to whatever you want.

提交回复
热议问题