HTML5 includes a concept of \"mutation observers\" to monitor changes to the browser\'s DOM.
Your observer callback will be passed data which looks a lot like DOM tr
I know this is an old question but perhaps this can help others searching for alternative solutions. I recently learned about Mutation Observers and wanted to experiment with using them alongside jQuery. I came up with two possible approaches and turned them into plugins. The code is available here.
The first approach (jquery.observeWithEvents.js
) uses jQuery's trigger()
function to trigger either an insertNode
or removeNode
event which can be bound to via jQuery's on()
function. The second approach (jquery.observeWithCallbacks.js
) uses traditional callback parameters. Please take a look at the README for examples and usage.