Your problem is most likely due to the fact that the table is not visible ( display: none ) when you initialize the tablesorter in your table.
A possible solution is to perform the following initialization only after the table is visible with:
if($('tab_parent_of_the_table').is(':visible')) { $("your_table_table").tablesorter({ widgets: ['zebra'] }); }
An even better solution is to wrap the visibility check with a timeout, since this is usually done before the visibility change is applied, which leads to a false statement. Do the following:
setTimeout(function(){ if($('tab_parent_of_the_table').is(':visible')) { $("your_table_table").tablesorter({ widgets: ['zebra'] }); } }, 50);
source share