Wouldn't it be best (bug or no bug) to just bind the event to the
tbody or table element, and check the clicked row from event.target?
This method only needs one event handler binding regardless of the
number of rows (so performance is better), it works even when you add
rows dynamically, and it doesn't matter if tablesorting does something
with the rows.

Quick code example follows (remove a table row when clicked):

HTML:
<table id="myTable">
  <tbody>
    <tr>
      <td>foo bar </td>
    </tr>
    <tr>
      <td>foo bar </td>
    </tr>
    <tr>
      <td>foo bar </td>
    </tr>
  </tbody>
</table>

Javascript (place in $(document).ready(function() { ... } ); )

$('#myTable tbody').bind('click',function(e)
{
   var clicked_row = $(e.target).parent(); // Get the parent, since
e.target points to the td-element
   clicked_row.remove();
});

Reply via email to