The jQuery API .remove() method will remove the specified elements from the DOM. Once removed they can no longer be targeted with other methods. 

It will remove the element or elements specified and any elements contained within them. Any data associatied with that element is also removed. If you want to get rid of the elements but keep the data, use the .detach() method. You can also choose to use the .hide() method if you wish to have these elements show again later in the script.

You may put the name of the element to be removed from the parent element specified as well. For example $("#quoteBox").remove("h2"); will remover the <h2> elements but leave the #quoteBox element. 

Here is an example of .remove():

$("#warning span").click(function(){


<p id="warning">This box will be removed from the DOM when you click on "X CLOSE"<br/><br/><span>X CLOSE</span></p>
<p>Now you can see the rest of the content</p>

The result: