From d1f70cc5223effccfccde9972add17422fe0bd3c Mon Sep 17 00:00:00 2001 From: Christopher Thomas Date: Sun, 24 Nov 2013 21:00:25 +0100 Subject: [PATCH] I modified the location where the pager creates new elements by first asking whether the data contains a td element and if it does, use that instead, this allows the ajax callback to output a fully rendered table with td elements already created, the callback to obtain those elements and just rebuild the columns using those elements, with all the required classnames, attributes, etc. --- addons/pager/jquery.tablesorter.pager.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 7fd4d47b..26836fe0 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -279,7 +279,11 @@ tds += ''; for ( j = 0; j < d[i].length; j++ ) { // build tbody cells - tds += '' + d[i][j] + ''; + var temp = $("").html(d[i][j]); + var inner = temp.find("td"); + temp = inner.length ? inner : temp.wrap("
").parent(); + + tds += temp.wrap("
").parent().html(); } tds += ''; }