empty div content jquery code example
Example 1: delete all child elements jquery
$("div").empty();
Example 2: jquery if div is empty
function isEmpty( el ){
return !$.trim(el.html())
}
if (isEmpty($('#element'))) {
// do something
}