I have a div Example:
jQuery recommend you use ".empty()",".remove()",".detach()" if you needed delete all element in element, use this code : if you needed delete all element, Use this code: i and jQuery group not recommend for use SET FUNCTION like .html() .attr() .text() , what is that? it's IF YOU WANT TO SET ANYTHING YOU NEED ref :https://learn.jquery.com/using-jquery-core/manipulating-elements/
$('#target_id').empty();
$('#target_id').remove();