delete all children jquery code example
Example 1: delete all child elements jquery
$("div").empty();
Example 2: jquery if empty remove div
//if empty remove parent
$('#id:empty').parent().remove();
$("div").empty();
//if empty remove parent
$('#id:empty').parent().remove();