How to remove an element slowly with jQuery?

前端 未结 8 1054
失恋的感觉
失恋的感觉 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:53

    target.fadeOut(300, function(){ $(this).remove();});
    

    or

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

    Duplicate: How to "fadeOut" & "remove" a div in jQuery?

提交回复
热议问题