jQuery Empty
Today I learned about the jQuery .empty()
method.
.empty()
removes all child nodes of the set of matched elements from the DOM. Consider it a delete button for whatever element you call it on.
.empty()
is equivalent to .html('')
but much faster.
h/t Cameron Daigle
Tweet