The remove() and detach() Methods

The detach() method works the same way, except that it keeps all jQuery data and events associated with the removed elements. This can be useful if you intend to reinsert the element back into the DOM at a later stage.

There are many more methods that can be used to manipulate the DOM. I'll be covering many of these throughout the rest of this tutorial.