Run a function when a DOM element is created
- by Ed Woodcock
Hi folks,
I want to bind an event to a certain class and ID for when matching objects are created in the DOM.
I am doing this as I have some jQuery code in an ASP UpdatePanel, which causes the DOM to be re-loaded on its partial postback. I have reset the events with live(), however I need to call a 2 line initialisation function as soon as the elements are created.
Is there any way to attach this to live(), or some other jQuery function, or will I have to write code to do this myself?
Thanks, Ed