I need to create an event listener such that, when a new element is added to the document, or any of its child, my event handler gets called.
Any ideas how to do this using?
this are the events to check element is inserted or removed.
bind on parent element this event.
and call your function in handler
js fiddle demo : http://jsfiddle.net/PgAJT/
click here for example... http://help.dottoro.com/ljmcxjla.php