Example

Remove the content of all p elements:

$("button").click(function(){
  $("p").empty();
});

Try it yourself »

Definition and Usage

The empty() method removes all content from selected elements, including text and child nodes.

Note: This method does not remove the element itself, or its attributes.

Syntax

$(selector).empty()