From 12789d0be36b1ae9e9a1a91c5b87f67e00d3a3d5 Mon Sep 17 00:00:00 2001 From: humancopy Date: Sun, 20 Oct 2013 00:13:23 +0200 Subject: [PATCH] Ignore colspaned columns for table properties calculations If the first td/th has a colspan the column calculations go crazy... :) --- jquery.fixedheadertable.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery.fixedheadertable.js b/jquery.fixedheadertable.js index 09692c2..82a893c 100644 --- a/jquery.fixedheadertable.js +++ b/jquery.fixedheadertable.js @@ -567,15 +567,15 @@ tableProp.border = ($obj.find('th:first-child').outerWidth() - $obj.find('th:first-child').innerWidth()) / borderCollapse; - $obj.find('thead tr:first-child > *').each(function(index) { + $obj.find('thead tr:first-child > *:not([colspan])').each(function(index) { tableProp.thead[index] = $(this).width() + tableProp.border; }); - $obj.find('tfoot tr:first-child > *').each(function(index) { + $obj.find('tfoot tr:first-child > *:not([colspan])').each(function(index) { tableProp.tfoot[index] = $(this).width() + tableProp.border; }); - $obj.find('tbody tr:first-child > *').each(function(index) { + $obj.find('tbody tr:first-child > *:not([colspan])').each(function(index) { tableProp.tbody[index] = $(this).width() + tableProp.border; });