![]() |
VOOZH | about |
The empty() method is an inbuilt method in jQuery that is used to remove all child nodes and their content for the selected elements.
Syntax:
$(selector).empty()
Parameter: This method does not accept any parameter.
Return Value: This method returns the selected element with the specified changes made by the empty() method.
The below example illustrates the empty() method in jQuery:
Example: In this example, we are using the jquery empty() method.
Output: