diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 06dcf33a..c0451359 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -479,7 +479,8 @@ p.initialized = true; $(table) .trigger('applyWidgets') - .trigger('pagerInitialized', p); + .trigger('pagerInitialized', p) + .trigger('pagerComplete', p); } }, @@ -946,7 +947,6 @@ $t.trigger('pagerBeforeInitialized', p); enablePager(table, p, false); - if ( typeof(p.ajaxUrl) === 'string' ) { // ajax pager; interact with database p.ajax = true; @@ -964,8 +964,11 @@ // pager initialized if (!p.ajax) { p.initialized = true; + moveToPage(table, p); updatePageDisplay(table, p, true); - $(table).trigger('pagerInitialized', p); + $(table) + .trigger('pagerInitialized', p) + .trigger('pagerComplete', p); } }); }; diff --git a/docs/index.html b/docs/index.html index c679dca3..2cbc0ca0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4833,8 +4833,11 @@ $('table').trigger( 'search', [['', '', '', '', 'orange']] ); // find orange in
$(function(){ // initialize the sorter diff --git a/js/widgets/widget-pager.js b/js/widgets/widget-pager.js index 152de8d7..6c9bc4a9 100644 --- a/js/widgets/widget-pager.js +++ b/js/widgets/widget-pager.js @@ -210,7 +210,9 @@ tsp = ts.pager = { // pager initialized p.initialized = true; p.isInitializing = false; - c.$table.trigger('pagerInitialized', c); + c.$table + .trigger('pagerInitialized', c) + .trigger('pagerComplete', c); tsp.updatePageDisplay(table, c); },