Javascript – How to monitor the DOM for changes


Is there a way – using jQuery or otherwise – to monitor the DOM for insertions, deletions, updates to styles, etc?

Best Solution

See "MutationEvent" elements in here: but those are deprecated.

jQuery now features a way to attach events to existing AND future elements corresponding to a selector:

It may be a trick you could use for lack of proper DOM Node modification info.