diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 72f47eb3..7750973c 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -247,26 +247,21 @@ result = p.ajaxProcessing(data, table) || [ 0, [] ], hl = $t.find('thead th').length; - $t.find('thead tr.' + p.cssErrorRow).remove(); // Clean up any previous error. + // Clean up any previous error. + ts.showError(table); if ( exception ) { if (c.debug) { ts.log('Ajax Error', xhr, exception); } - $err = $('
widget-pager.js
and jquery.tablesorter.pager.js
files; in version 3+, I plan to add it as a selectable option in a build.$.tablesorter.showError( table, message );+
table
- table DOM element (or jQuery object) of table (or tables).message
- a plain string, or string of an HTML row.cssErrorRow
option setting, or the pager widget pager_css.errorRow
option (the default class name is `"tablesorter-errorRow"`; and styled within each theme css file)."table refuses to cooperate"
'<tr><td colspan="' + table.config.columns + '">yeah, instead of showing your data... I am taking a nap</td></tr>'
(the table.config.columns
variable contains the number of table columns; use as needed)$.tablesorter.showError( table );
to remove all error rows from the table thead.