diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 509974e7..8b4842ee 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -136,7 +136,7 @@ }, hideRowsSetup = function(table, c){ - c.size = parseInt($(c.cssPageSize, c.container).val(), 10); + c.size = parseInt($(c.cssPageSize, c.container).val(), 10) || c.size; $.data(table, 'pagerLastSize', c.size); pagerArrows(c); if (!c.removeRows) { @@ -328,8 +328,8 @@ enablePager = function(table, c, triggered){ var p = $(c.cssPageSize, c.container).removeClass(c.cssDisabled).removeAttr('disabled'); c.isDisabled = false; - c.page = $.data(table, 'pagerLastPage') || 0; - c.size = $.data(table, 'pagerLastSize') || parseInt(p.val(), 10); + c.page = $.data(table, 'pagerLastPage') || 0 || c.page; + c.size = $.data(table, 'pagerLastSize') || parseInt(p.val(), 10) || c.size; c.totalPages = Math.ceil(c.totalRows / c.size); if (triggered) { $('table').trigger('update');