jQuery remove method
There are two methods for removing elements in jQuery: remove and detach.
The remove method removes elements permanently.
Let's say we have the following HTML code:
<p class="www">text</p>
<p class="www">text</p>
<p class="www">text</p>
<p>text</p>
Let's remove p with class www:
$('p').remove('.www');
HTML the code will look like this:
<p>text</p>
Or you can do it like this:
$('p.www').remove();
Remove all h2 with class zzz.