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