From c3089d6ceb10d6c7d4a842bef5f0333c8f0304e4 Mon Sep 17 00:00:00 2001 From: Mottie Date: Tue, 19 Feb 2013 23:13:43 -0600 Subject: [PATCH] get correct number of cols in widgetFixed - issue #238 --- js/jquery.tablesorter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 902ef305..8750ce0a 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -452,7 +452,7 @@ if (table.config.widthFixed && $(table).find('colgroup').length === 0) { var colgroup = $(''), overallWidth = $(table).width(); - $("tr:first td", table.tBodies[0]).each(function() { + $(table.tBodies[0]).find("tr:first").children("td").each(function() { colgroup.append($('').css('width', parseInt(($(this).width()/overallWidth)*1000, 10)/10 + '%')); }); $(table).prepend(colgroup);