技術需求: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