Binding DOMNodeRemoved will allow you to detect deletion of nodes inside the associated element. Works in Firefox, Iron and Opera ... but not in IE.
JQuery
$("#detectchanges").bind("DOMNodeRemoved",function(){ alert('Something inside of detectchanges was terminated.'); }); $("#clickme").click(function(){ $("#deleteme").remove(); });
HTML
<div id="detectchanges"> <div id="deleteme">Delete me</div> </div> <div id="clickme">Delete</div>
Here is an example .
Gert grenander
source share