jQuery button position index
<p>I have a a list of buttons within a class container.</p>

<pre><code>&lt;div class="buttonContainer"&gt;
    &lt;button id="ONE"&gt;ONE&lt;/button&gt;
    &lt;button id="TWO"&gt;TWO&lt;/button&gt;
    &lt;button id="THREE"&gt;THREE&lt;/button&gt;
&lt;/div&gt;
</code></pre>

<p>What I'm trying to get is the numeric position of the button that I clicked:</p>

<pre><code>$('.buttonContainer button').click(function (e) {
    var id = this.id;

    // id contains the name of the id of the button clicked.

});
</code></pre>

<p>I've tried:
    $('.buttonContainer button.clicked').index();</p>

<p>But that's not working.  Does anyone have a better suggestion?</p>
