JQuery如何监听DIV内容变化

技术需求:html

当Div内容发生变化生,须要监听事件,并执行指定的方法。ide


代码分解:htm

#wb_follow_btn   是Div的id事件

DOMNodeInserted  绑定监听方法element


完整代码:get

$("#wb_follow_btn").bind('DOMNodeInserted', function(e) {      it

   alert('element now contains: ' + $(e.target).html());  io

});function

相关文章
相关标签/搜索