title: How do I assign click events and IDs to multiple buttons in twitter bootstrap?
body: <p>I currently have multiple drop down buttons for several table rows that need to be tied to an onClick event.  The problem I'm having is capturing the information from each button. Here is what my test code looks like:</p>
  
  <pre><code>&lt;table class="table table-bordered"&gt;
      &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;img src="/photos/files/5/m/131309a4fb918110ed1061e90a715eca.jpeg"/&gt;&lt;/td&gt;&lt;td&gt;&lt;div class="btn-group"&gt;
        &lt;a class="btn btn-primary" href="#"&gt;&lt;i class="icon-user icon-white"&gt;&lt;/i&gt; User&lt;/a&gt;
        &lt;a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"&gt;&lt;span class="caret"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;ul class="dropdown-menu"&gt;
          &lt;li&gt;&lt;a href="#"&gt;&lt;i class="icon-pencil"&gt;&lt;/i&gt; Edit&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;&lt;i class="icon-trash"&gt;&lt;/i&gt; Delete&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;img src="/photos/files/5/m/b19102d8ba1158e2a139ffa84e8e8540.jpeg"/&gt;&lt;/td&gt;&lt;td&gt;&lt;div class="btn-group"&gt;
        &lt;a class="btn btn-primary" href="#"&gt;&lt;i class="icon-user icon-white"&gt;&lt;/i&gt; User&lt;/a&gt;
        &lt;a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"&gt;&lt;span class="caret"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;ul class="dropdown-menu"&gt;
          &lt;li&gt;&lt;a href="#"&gt;&lt;i class="icon-pencil"&gt;&lt;/i&gt; Edit&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;&lt;i class="icon-trash"&gt;&lt;/i&gt; Delete&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;&lt;/tr&gt;    
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>current javascript:</p>
  
  <pre><code>$('.btn').click(function(e) {
      e.preventDefault();
      ???
  });
  </code></pre>
  
  <p>How do I capture and process each click event from multiple buttons? I'm assuming I need to add a unique ID to each button but how can I capture an onclick event for each button item?</p>