Is there a simple way to know when the DOM has been changed ?
Is there any built-in JavaScript/jQuery event/function for this ?
You can attach to many DOM events depending on the type of change you wish to listen for. Here's a page with all the DOM change events:
https://developer.mozilla.org/en/DOM_Events
The generic, catch-all DOM change event is DOMSubtreeModified. For example:
document.getElementById('abc').addEventListener('DOMSubtreeModified', f, false);