0

Is there a way to detect dynamic DOM element Style changes (add, remove styles) using JQuery? I am trying to make an event that will get triggered if the element Style changed either by adding or removing classes dynamically. Thanks

  <img id="productImg" width="200" height="200" style="">
MChan
  • 6,842
  • 27
  • 83
  • 132
  • No, there is not! Well, there probably is, `DOMSubtreeModified` would probably detect changes to the style attribute as well, but you shouldn't use it, and an interval to check the attribute is another option that you should stay away from. – adeneo Aug 15 '14 at 09:46
  • @adeneo Thanks but both approaches are tough as you have mentioned, quite frustrating to know that there is no on change attribute event handler – MChan Aug 15 '14 at 18:42

0 Answers0