title: How to determine in which table row <tr> the keyup event is triggered?
body: <p>I have a long table (10,000 rows, 10 columns) that can be edited on screen. After editing, the changes can be saved. Since I do not want to re-save the entire table I want to keep track of the rows where changes have been made. Each row-tag has a unique id as well as the table-tag. But using .keyup only functions with $('table') and not with $('tr') or $('td') and always returns the is of the table-tag. Here's a short example of my html-code:</p>
  
  <pre><code>    &lt;table id="table1" contenteditable="true"&gt;
        &lt;tr id="tr1"&gt;&lt;td&gt;Cell 11&lt;/td&gt;&lt;td&gt;Cell 12&lt;/td&gt;&lt;td&gt;Cell 13&lt;/td&gt;&lt;/tr&gt;
        &lt;tr id="tr2"&gt;&lt;td&gt;Cell 21&lt;/td&gt;&lt;td&gt;Cell 22&lt;/td&gt;&lt;td&gt;Cell 23&lt;/td&gt;&lt;/tr&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>And in jQuery I've tried several things like:</p>
  
  <pre><code>    $(document).ready(function() {
        $('table').keyup(function(e) {
          alert($(this).attr('id'));
        });
      });
  </code></pre>
  
  <p>This always results in 'table1'. How can I get 'tr1', 'tr2', etc.?</p>