diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 47baf727..3ea18e5e 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -330,12 +330,12 @@ fixHeight(table, p); // apply widgets after table has rendered $t.trigger('applyWidgets'); - if (p.initialized) { - $t.trigger('pagerChange', p); - $t.trigger('updateComplete'); - } else { - $t.trigger('update'); - } + $t.trigger('update', [false, function(){ + if (p.initialized) { + $t.trigger('updateComplete'); + $t.trigger('pagerChange', p); + } + }]); } if (!p.initialized) { p.initialized = true; diff --git a/js/widgets/widget-pager.js b/js/widgets/widget-pager.js index 5a043566..58fa6a19 100644 --- a/js/widgets/widget-pager.js +++ b/js/widgets/widget-pager.js @@ -516,12 +516,12 @@ tsp = ts.pager = { tsp.fixHeight(table, c); // apply widgets after table has rendered $t.trigger('applyWidgets'); - if (p.initialized) { - $t.trigger('pagerChange', c); - $t.trigger('updateComplete'); - } else { - $t.trigger('update'); - } + $t.trigger('update', [false, function(){ + if (p.initialized) { + $t.trigger('updateComplete'); + $t.trigger('pagerChange', p); + } + }]); } if (!p.initialized) { p.initialized = true;