codeGK
Code it ALL
jQuery empty() - CodeGK

♦ jQuery empty()

♣ Example2: jQuery empty()

Removes only the child elements from the selected element.
Basic Syntax
$(selector).empty(data);
selector: the HTML element to be selected.
empty(): syntax for emptying all the child elements of selected HTML element.
In this example, jQuery empty() method is illustrated.
Example
Input:
Output:
Remove