开发者

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');
    })
})
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜