jQuery :empty Selector

Last Updated Jul 21, 2015, 12:00:06 PM

jQuery :empty Selector

jQuery empty() method used to empty the all child nodes of matched HTMLelements from the DOM tree.

jQuery empty() method empties the child elements as well as the text content in the matched element.


Here is the example about how to use jQuery .empty() method


The above example will produce the following output

jQuery empty() method
Try It Now

jQuery DOM Reference

Other Advanced jQuery and DOM topics you might want to learn

jQuery Basic DOM Methods

jQuery DOM Removal

jQuery DOM Insertion Inside

jQuery DOM Insertion Outside

jQuery DOM Insertion Around

Sources and Credits

The content and methods in the tutorial has been referred and updated with jQuery API and The jQuery Foundation

Last Updated Jul 21, 2015, 12:00:06 PM