jQuery remove Method

jQuery remove Method : is used to remove the selected element from the DOM. It removes the selected element completely from the document object model. It will exist no longer if you remove the element.

Note : Empty method removes child elements and keeps the selector element while remove method removes the child elements including the selector itself.


Syntax for remove method –


jQuery remove Method Example

Below example shows the remove method try it –

jQuery remove() Method – Example

<script type="text/javascript">
              $( "#removeExample" ).on( "click", function(event) {             

Try it »

The above example will produce following output-

jQuery remove Method Example And Demo


Add Comment

📖 Read More