get correct number of cols in widgetFixed - issue #238

This commit is contained in:
Mottie 2013-02-19 23:13:43 -06:00
parent c96f36d4ac
commit c3089d6ceb

View File

@ -452,7 +452,7 @@
if (table.config.widthFixed && $(table).find('colgroup').length === 0) {
var colgroup = $('<colgroup>'),
overallWidth = $(table).width();
$("tr:first td", table.tBodies[0]).each(function() {
$(table.tBodies[0]).find("tr:first").children("td").each(function() {
colgroup.append($('<col>').css('width', parseInt(($(this).width()/overallWidth)*1000, 10)/10 + '%'));
});
$(table).prepend(colgroup);