The remove method
The remove method completely removes the selected elements from the DOM. To remove elements without removing jQuery data and events associated with the elements, use the detach method.
Syntax
This is how we remove elements. Additionally, we can filter the selected elements by passing the optional parameter selector to the method:
.remove([selector]);
Example
Let's remove all paragraphs with the class www:
<p>text</p>
<p>text</p>
<p class="www">text</p>
<p class="www">text</p>
$('p.www').remove();
HTML the code will look like this:
<p>text</p>
<p>text</p>