Library - JQuery

Back to Course

Lesson Description

Lession - #569 JQuery Remove

The jQuery remove(>
method is used to remove the selected elements out of the DOM. It removes the selected element itself, as well as everything within it (including all texts and child nodes>
. This method also removes the data and the events of the selected elements.

Jquery remove methods
  • remove(>
    - Removes the chosen element (and its child elements>
  • empty(>
    - Removes the child elements from the chosen element

     <title> jQuery Example</title>  
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">  
    	<div id="div1" style="height:100px;width:300px;border:1px solid black;background-color:green;">
    demonstrating remove method
    <button>Remove div element</button>
    Try it here