jquery sequence fadeOut and then remove

后端 未结 3 925
-上瘾入骨i
-上瘾入骨i 2021-02-05 13:37

I try $(\'somediv\').fadeOut.remove(); but it only remove it, bang... it dont wait for the nice fadeOut, and THEN remove

why.. how to respect fadeout, and t

3条回答
  •  一个人的身影
    2021-02-05 14:15

    Here is the simple way,

    $('#somediv').fadeOut(300,function(){ $(this).remove(); })};
    

    or

    $('#somediv').fadeOut("slow",function(){ $(this).remove(); })};
    

提交回复
热议问题