Alex Rivera | Logout

jQuery empty() vs remove()

Asked 2010-06-22T06:11:24.927
104

What's the difference between empty() and remove()methods in jQuery, and when we call any of these methods, the objects being created will be destroyed and memory released?

Edit
Report

1 Answer

2

$("body").empty() -- it' removes the HTML DOM elements inside the body tag -

when you declare $("body").remove() - it remove the entire HTML DOM along with body TAG .

answered 2013-08-03T05:18:55.340

Your Answer