diff --git a/js/jquery.tablesorter.js b/js/jquery.tablesorter.js index 236d8ed9..32bba677 100644 --- a/js/jquery.tablesorter.js +++ b/js/jquery.tablesorter.js @@ -497,7 +497,8 @@ if (table.config.widthFixed && $(table).find('colgroup').length === 0) { var colgroup = $(''), overallWidth = $(table).width(); - $(table.tBodies[0]).find("tr:first").children("td").each(function() { + // only add col for visible columns - fixes #371 + $(table.tBodies[0]).find("tr:first").children("td:visible").each(function() { colgroup.append($('').css('width', parseInt(($(this).width()/overallWidth)*1000, 10)/10 + '%')); }); $(table).prepend(colgroup);