diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 5a6f6fae..06378fa4 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -333,7 +333,7 @@ fixHeight(table, p); // apply widgets after table has rendered $t.trigger('applyWidgets'); - $t.trigger('update', [false, function(){ + $t.trigger('updateRow', [false, function(){ if (p.initialized) { $t.trigger('updateComplete'); $t.trigger('pagerChange', p); @@ -564,7 +564,7 @@ pg.val(p.size); // set page size p.totalPages = Math.ceil( Math.min( p.totalPages, p.filteredPages ) / p.size ); if ( triggered ) { - $(table).trigger('update'); + $(table).trigger('updateRow'); setPageSize(table, p.size, p); hideRowsSetup(table, p); fixHeight(table, p); diff --git a/docs/index.html b/docs/index.html index a42b35a7..50b17cd0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3243,7 +3243,7 @@ $("table").trigger("sortReset"); / Update the tbody's stored data (update & updateRow do exactly the same thing) -
+

// Add new content
 $("table tbody").append(html);
 
@@ -3264,7 +3264,9 @@ $("table").trigger("update", [resort, callback]);
 var sorting = [[2,1],[0,0]];
 $("table")
 	.trigger("update", [ false ])
-	.trigger("sorton", [sorting]);
+ .trigger("sorton", [sorting]); + Note: updateRow was added to work around the issue of using jQuery with the Prototype library. Triggering an "update" would make Prototype clear the tbody; Please see issue #217 for more details. +
Example diff --git a/js/widgets/widget-pager.js b/js/widgets/widget-pager.js index 099e7ad3..4a4103a9 100644 --- a/js/widgets/widget-pager.js +++ b/js/widgets/widget-pager.js @@ -519,7 +519,7 @@ tsp = ts.pager = { tsp.fixHeight(table, c); // apply widgets after table has rendered $t.trigger('applyWidgets'); - $t.trigger('update', [false, function(){ + $t.trigger('updateRow', [false, function(){ if (p.initialized) { $t.trigger('updateComplete'); $t.trigger('pagerChange', c); @@ -762,7 +762,7 @@ tsp = ts.pager = { p.totalPages = Math.ceil( Math.min( p.totalPages, p.filteredPages ) / p.size ); c.$table.removeClass('pagerDisabled'); if ( triggered ) { - c.$table.trigger('update'); + c.$table.trigger('updateRow'); tsp.setPageSize(table, p.size, c); tsp.hideRowsSetup(table, c); tsp.fixHeight(table, c);