Juliano.net wrote:
How can I detect when a TAG is included dinamically to my page to do
some actions using that TAG?
W3C DOM Level 2 Mutation events are supported by Mozilla and Opera.
For instance the DOMNodeInserted event
if (typeof document.addEventListener != 'undefined') {
document.addEventListener(
'DOMNodeInserted',
function (evt) {
alert('Inserted ' + evt.target + ' into ' + evt.relatedNode);
},
false
);
}
See the W3C DOM Level 2 Mutation Events specification
<http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-mutationevents>
--
Martin Honnen
http://JavaScript.FAQTs.com/