how to listen the change in DIVs with jQuery

1
2
3
4
5
var title = $("b.facility");
var title = $('#title');//the element I want to monitor
title.bind('DOMNodeInserted', function(e) {
    alert('element now contains: '+ $(e.target).html());
});

 

 

from http://blog.itblood.com/jquery-how-to-listen-div-content-change.html