mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
get correct number of cols in widgetFixed - issue #238
This commit is contained in:
parent
c96f36d4ac
commit
c3089d6ceb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user