event trigger on class change
<p>I'd like my event triggered on div tag acquires "trigger" class.
but, I have no idea how to make it listen to the class adding event.</p>

<p>Could you please tell me how or which I need to know?</p>

<pre><code>&lt;div id="test"&gt;test&lt;/div&gt;

&lt;script type="text/javascript"&gt;
    document.getElementsById.setAttribute("class", "trigger");

    function workOnClassAdd() {
       alert("I'm triggered");
    }
&lt;/script&gt;
</code></pre>
