title: ASP Repeater - catch generated button click in jQuery function
body: <p>I'm pretty new to jQuery and I'm having problems with picking up button click events in jQuery from buttons generated within an ItemTemplate in an ASP Repeater.  </p>
  
  <p>I've spent a few (wasted) hours searching for an answer that will work, with no luck yet.</p>
  
  <p>A snip from My .ASPX page:</p>
  
  <pre><code>&lt;asp:Repeater ID="rptJobs" runat="server"&gt;
      &lt;ItemTemplate&gt;
          &lt;asp:Panel ID="Panel1" runat="server"&gt;
              &lt;table&gt;
                  &lt;tr&gt;
                      &lt;td&gt;Desc:&lt;/td&gt;
                      &lt;td&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;%#Eval("DESCRIPTION")%&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
              &lt;asp:Button runat="server" ID="myBtn" Tag='&lt;%# Eval("JOB_NO") %&gt;' Text='Go'  /&gt;
          &lt;/asp:Panel&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>The generated HTML:</p>
  
  <pre><code>&lt;div id="rptJobs_ctl00_Panel1"&gt;
      &lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;Desc:&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;Test Data 1&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
      &lt;input type="submit" name="rptJobs$ctl00$myBtn" value="Go" id="rptJobs_ctl00_myBtn_0" Tag="MI0683" /&gt;
  &lt;/div&gt;
  &lt;div id="rptJobs_ctl01_Panel1"&gt;
      &lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;Desc:&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;Test Data 2&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
      &lt;input type="submit" name="rptJobs$ctl01$myBtn" value="Go" id="rptJobs_ctl01_myBtn_1" Tag="MI0684" /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now, this jQuery works (specifying the generated button id):</p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;
      $(document).ready(function () {
          $(function () {
              $("#rptJobs_ctl00_myBtn_0").click(function () {
           // This displays the text from the Tag element of the button...    
                  alert($(this).attr("tag"));
              });
          });
  
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>However, I want to be able to use a generic function that will be called for the click event for all the generated buttons - any help appreciated!</p>
  
  <p>Ted H</p>