Skip to main content

DOM Mutation event in JQuery or vanilla Javascript



Are there any DOM mutation events in JQuery or in vanilla Javascript that fire cross browser?





To clarify, say I have a script on my page which inserts a div into the body. I don't have access to the script and I don't know when the div has been inserted. I was wondering if there's a DOM mutation event that I can add a listener for to know when the div has been inserted. I know I can use some kind of timer to periodically check for the div but I don't really like the overhead that this would impose.



Source: Tips4all

Comments

  1. Not without a plugin, I believe, but I wouldn't be surprised if I'm wrong.

    My research has found a a few to choose from.

    Here's one: http://plugins.jquery.com/project/mutation-events

    Here's another: https://www.adaptavist.com/display/jQuery/Mutation+Events

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?