Determine which button was pressed using jQuery
<p>Say that I have three "button" elements in one parent "div". Assuming that these buttons could be labeled 1, 2, 3 or 0, 1, 2, using jQuery, is there an easy way to determine the number of which button is clicked?</p>

<p>Here's the HTML:</p>

<pre><code>&lt;div class="table-tabs"&gt;
    &lt;button class="tab1 selected"&gt;Description&lt;/button&gt;
    &lt;button class="tab2"&gt;Monitoring&lt;/button&gt;
    &lt;button class="tab3"&gt;Change Logs&lt;/button&gt;
&lt;/div&gt;
</code></pre>

<p>I would like to know the number so that I can activate the appropriate table when a button is pressed.</p>
