.empty()

.empty()

.empty()Returns: jQuery

Description: Remove all child nodes of the set of matched elements from the DOM.

  • version added: 1.0.empty()

    • This method does not accept any arguments.

This method removes not only child (and other descendant) elements, but also any text within the set of matched elements. This is because, according to the DOM specification, any string of