SyntaxFix
Write A Post
Hire A Developer
Questions
You can use .empty(), like this:
.empty()
$("#foo").empty();
From the docs:
Remove all child nodes of the set of matched elements from the DOM.