1

I want to detect changes in a given DOM subtree. What is the best way to do that? I'm fine with using jQuery and chrome browser only solution.

Here are some examples of changes that I want to detect

  • Removal or Addition of DOM elements in a given DOM subtree/DOM element.
  • CSS changes for e.g., some button in that DOM structure is enabled from being disabled.
  • Content changes, Text in some paragraph of a selected div changes.

I want to be able to write this function $(parent).somethingchanges(dothis); which handles all the above cases.

sublime
  • 4,013
  • 9
  • 53
  • 92
  • There's no need to use jQuery or a Chrome-only solution. You just need a simple event handler. If you want to use jQuery, though, I believe they use `.on()` for that. – TylerH Apr 03 '15 at 00:03

0 Answers0