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

前端 未结 7 1571
天涯浪人
天涯浪人 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:31

    Use animate() instead of fadeIn():

    $(this)
      .css('opacity', 0)
      .slideDown('slow')
      .animate(
        { opacity: 1 },
        { queue: false, duration: 'slow' }
      );
    

提交回复
热议问题