How to alert ,when div content changes using jquery
I want to giv开发者_Python百科e a alert message,when div content changes.
Is there any listener provided by jquery api for div element?
Bind the dom modification events -
$(document).ready(function(){
$('#test_div').bind('DOMNodeInserted DOMSubtreeModified DOMNodeRemoved', function(event) {
alert('Changed');
})
})
精彩评论