In the jquery documentation of the "empty" function (http://api.jquery.com/empty/) there is the following statement:
"To avoid memory leaks, jQuery removes other constructs such as data and event handlers
from the child elements before removing the elements themselves."
The text says: "... jQuery removes event handlers from the !C H I L D! elements ...". But I want the event handlers also removed from the div tag ($("#mydiv").empty). I know that there is the function "remove", but my intention is to not remove the div tag. What is the best way to get this done?
The other thing is:
When they say "remove event handlers". Do they only remove constructs made with "bind" or do they also remove constructs made with "delegate"?
Thanks alot in advance