jQuery queue events

后端 未结 3 1055
不思量自难忘°
不思量自难忘° 2021-02-06 09:22

So what I want to do is to coordinate some effects using jQuery for some AJAX calls that I\'m working with. My problem is that the fadeIn for the second div fires at the same ti

3条回答
  •  梦谈多话
    2021-02-06 10:09

    You can do this by using a callback. Check out the jQuery docs.

    jQuery("#div1").fadeOut("slow", function() { jQuery(this).fadeIn('slow'); }); 
    

    Pretty much all of the jQuery effects take a callback to execute after the effect is over.

提交回复
热议问题