How to add click event by class name?
<p>I have a example html menu:</p>

<pre><code>&lt;div class="mmenu"&gt;
    &lt;ul&gt;
        &lt;li&gt;
            &lt;div  class="menu_button" id="m1" &gt;A&lt;/div&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;div  class="menu_button" id="m2" &gt;B&lt;/div&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;div  class="menu_button" id="m3" &gt;C&lt;/div&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>Can I add click event for each element of menu by class name ?</p>

<pre><code> $('.menu_button').click(function() {
     if ( id == "m1" ) ....
 })
</code></pre>
