How to remove an element slowly with jQuery?

前端 未结 8 1063
失恋的感觉
失恋的感觉 2020-12-12 13:49

$target.remove() can remove the element,but now I want the process to be down with some feel animation,how to do it?

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-12 14:50

    $target.hide('slow');
    

    or

    $target.hide('slow', function(){ $target.remove(); });
    

    to run the animation, then remove it from DOM

提交回复
热议问题