jQuery and Rails - Problem with tablesorter plugin

jQuery and Rails - Problem with tablesorter plugin

I'm trying to use the tablesorter plugin with a rails application. I have a table that's generated from a model with the required <thead> and <tbody> tags, and relies on a partial to generate the rows. I've bound it to the plugin the way it's supposed to in application.js :

jQuery.noConflict();

jQuery( function() {
    jQuery("#my_table").tablesorter();
});


And the sorting kinda works. I have two problems:

1) The sort only works when holding down Shift key while clicking on the column header.

2) My <tr> tags are also bound to a prototype onclick event, and I've noticed that if I try to sort after the event was active it sometimes create duplicate rows (the actual onclick event replaces a <tr> row with a form to edit that row, and returns to the view row after submitting or canceling).

Also, when the page first loads, clicking on the header (without the Shift key) causes the rows to scramble a bit before returning to their original layout, if it's any help.

Has anyone seen this before or knows how to work around this? Thanks!