I'm guessing you're using the original tablesorter (http://tablesorter.com). Don't trigger an appendCache
after an update
, especially with the pager plugin.
The appendCache
method adds all table rows back into the table. So for example, if you wanted to add a row or rows to a table, with the pager initialized, you would do the following:
$('table')
.trigger('appendCache')
.append( $myNewRows )
.trigger('update')
.trigger('sorton', [sorting]);
Might I suggest you check out my fork of tablesorter (don't forget to update the pager too). You shouldn't need to make any changes to your initialization code. And if you need to add a row or rows to the table, you can use the addRows
method:
var $row = $('<tr>...</tr>'),
resort = true, // resort the table using the current sort
callback = function(table){
console.log('rows added', $row);
};
$('table')
.find('tbody').append($row)
.trigger('addRows', [$row, resort, callback]);