title: JQuery delegate method on a grid
body: <p>I am trying to use the delegate method on a grid that I wrap with the DataTables.Net plug-in. I originally had this code which works as expected.</p>
  <pre><code>    $(&quot;#myGrid tbody tr&quot;).click(function() {
          var id = $(this).children('td').eq(0).text();
          alert(id);
      });
  </code></pre>
  <p>However, if I change the paging size then the newer rows don't have the click event calling the function. I decided the new JQuery delegate method should do exactly what I wanted; however, it does nothing at all on any tr element.</p>
  <p>Could anyone explain why this does not work :</p>
  <pre><code>    $('#myGrid tbody').delegate('tr', 'click', function() {
          var id = $(this).children('td').eq(0).text();
          alert(id);
      }); 
  </code></pre>
  <p>I have tried different combinations of the selector and none get it to work.</p>