开发者

How to alert ,when div content changes using jquery

开发者 https://www.devze.com 2023-04-11 07:34 出处:网络
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 -

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

精彩评论

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