jQuery queue events

后端 未结 3 1052
不思量自难忘°
不思量自难忘° 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:06

    There were some typos in the above example which prevented it from working in Firefox, the corrected version:

    $("#div1").fadeOut();
    $("#div1").queue(function()
    {
       $(this).fadeIn();
       $(this).dequeue();
    });
    $("#div").queue(function() 
    {
       $(this).html("And now I'm sliding up. Wee!");
       $(this).slideUp("slow");
       $(this).dequeue();
    });
    

提交回复
热议问题