Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
67
rated 0 times [  72] [ 5]  / answers: 1 / hits: 41388  / 12 Years ago, mon, march 12, 2012, 12:00:00

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?


More From » jquery

 Answers
27
.bind('DOMNodeInserted DOMNodeRemoved')


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


[#86905] Saturday, March 10, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dusty

Total Points: 739
Total Questions: 97
Total Answers: 85

Location: Angola
Member since Wed, Apr 13, 2022
2 Years ago
;