like change jquery code example
Example: jquery on element change
// On element change.
$('mydiv').bind('DOMSubtreeModified', function () {
console.log('changed');
});
// On element change.
$('mydiv').bind('DOMSubtreeModified', function () {
console.log('changed');
});