If I have a div [ id="divId"] with a button on it [ id="divBtn" ] , and I add some data to the div and I bind a click event to the button: e.g.
What happens to the data and button bind event if I remove the div? e.g.
- $("#divId").add("dname","value");
- $("#divBtn").bind("myEvent", function(){...});
Are they cleaned up? Or, do I need to unbind and removeData before I remove the div?
- $("#divId").remove();
Thanks!