Home >>jQuery Tutorial >jQuery remove() Method

jQuery remove() Method

jQuery remove() Method

jQuery remove() method in jQuery is used to removes the selected elements, including all child nodes and text and also removes events and data of the selected elements.


Parameter Values

Parameter Description
selector It is optional parameter and is used to specifies one or more elements to be removed. For separate elements Use comma (,) to remove multiple elements
Here is an Example of jQuery remove() Method:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<p class="txt">This is First paragraph.</p>
<p class="txt">This is Second paragraph.</p>
<button class="btn1">Click me to Remove p elements</button>


This is First paragraph.

This is Second paragraph.