{"id":112,"date":"2013-06-11T06:33:09","date_gmt":"2013-06-11T06:33:09","guid":{"rendered":"http:\/\/blog.chen-hongyi.com\/?p=112"},"modified":"2013-06-11T06:33:09","modified_gmt":"2013-06-11T06:33:09","slug":"how-to-listen-the-change-in-divs-with-jquery","status":"publish","type":"post","link":"https:\/\/chen-hongyi.com\/?p=112","title":{"rendered":"how to listen the change in DIVs with jQuery"},"content":{"rendered":"<blockquote>\n<div>\n<div id=\"highlighter_409297\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td>\n<div>1<\/div>\n<div>2<\/div>\n<div>3<\/div>\n<div>4<\/div>\n<div>5<\/div>\n<\/td>\n<td>\n<div>\n<div><code>var title = $(<\/code><code>\"b.facility\"<\/code><code>);<\/code><\/div>\n<div><code>var title = $(<\/code><code>'#title'<\/code><code>);<\/code><code>\/\/the element I want to monitor<\/code><\/div>\n<div><code>title.bind(<\/code><code>'DOMNodeInserted'<\/code><code>, function(e) {<\/code><\/div>\n<div><code>\u00a0\u00a0\u00a0\u00a0<\/code><code>alert(<\/code><code>'element now contains: '<\/code><code>+ $(e.target).html());<\/code><\/div>\n<div><code>});<\/code><\/div>\n<p><code>\u00a0<\/code><\/p>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/blockquote>\n<div>\n<div id=\"highlighter_409297\">\n<p>from\u00a0http:\/\/blog.itblood.com\/jquery-how-to-listen-div-content-change.html<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1 2 3 4 5 var title = $(&#8220;b.facility&#8221;); v &hellip; <a href=\"https:\/\/chen-hongyi.com\/?p=112\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[32],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-listen-div"],"_links":{"self":[{"href":"https:\/\/chen-hongyi.com\/index.php?rest_route=\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chen-hongyi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chen-hongyi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chen-hongyi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chen-hongyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=112"}],"version-history":[{"count":1,"href":"https:\/\/chen-hongyi.com\/index.php?rest_route=\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":113,"href":"https:\/\/chen-hongyi.com\/index.php?rest_route=\/wp\/v2\/posts\/112\/revisions\/113"}],"wp:attachment":[{"href":"https:\/\/chen-hongyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chen-hongyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chen-hongyi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}