title: jQuery fire function when element specific class change
body: <p>I need to trigger an event when i add a specific class on button, but I have no idea how to make it listen to the class adding event.</p>
  <p>I have something like this:</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;   
  
  $(document).ready(function() {
   
  
      $(id_element).addClass(&quot;active&quot;);
   
       //this function will fire on add &quot;active&quot; class to &quot;id_button&quot; element
       function fireOnActiveClass() {
          //do something
       }
  
  
  } 
  
  &lt;/script&gt;
  </code></pre>
  <p>I can't touch code <code>$(id_element).addClass(&quot;active&quot;);</code>, for more reasons.</p>
  <p>Currently I use jQuery 1.7.2</p>
  <p>Could you please tell me how or which I need to know?</p>