How to remove an element slowly with jQuery?

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

    I've modified Greg's answer to suit my case, and it works. Here it is:

    $("#note-items").children('.active').hide('slow', function(){ $("#note-items").children('.active').remove(); });
    
    0 讨论(0)
  • 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?

    0 讨论(0)
提交回复
热议问题