title: How can I detect when an HTML element’s class changes?
body: <pre><code>&lt;div class="current"&gt;&lt;/div&gt;
  &lt;a href="#"&gt;text&lt;/a&gt;
  </code></pre>
  
  <p>How do I detect when e.g. a <code>.live</code> class is added to this <code>&lt;div&gt;</code> and do something when it happened?</p>
  
  <p>For example, if class is changed, then hide the link.</p>
  
  <p>I have a minified script that makes changes on the <code>&lt;div&gt;</code>'s class. It’s too big for me to find the place where it happens, so I'm searching for some way to catch the class change.</p>