? 234377_tableHeader_multiple_attachments.patch
Index: misc/tableheader.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/tableheader.js,v
retrieving revision 1.16.2.2
diff -u -p -r1.16.2.2 tableheader.js
--- misc/tableheader.js	30 Mar 2009 12:48:09 -0000	1.16.2.2
+++ misc/tableheader.js	23 Nov 2010 14:25:48 -0000
@@ -1,5 +1,8 @@
 // $Id: tableheader.js,v 1.16.2.2 2009/03/30 12:48:09 goba Exp $
 
+// Keep track of all cloned table headers.
+Drupal.tableHeaderHeaders = [];
+
 Drupal.tableHeaderDoScroll = function() {
   if (typeof(Drupal.tableHeaderOnScroll)=='function') {
     Drupal.tableHeaderOnScroll();
@@ -12,9 +15,6 @@ Drupal.behaviors.tableHeader = function 
     return;
   }
 
-  // Keep track of all cloned table headers.
-  var headers = [];
-
   $('table.sticky-enabled thead:not(.tableHeader-processed)', context).each(function () {
     // Clone thead so it inherits original jQuery properties.
     var headerClone = $(this).clone(true).insertBefore(this.parentNode).wrap('<table class="sticky-header"></table>').parent().css({
@@ -23,7 +23,7 @@ Drupal.behaviors.tableHeader = function 
     });
 
     headerClone = $(headerClone)[0];
-    headers.push(headerClone);
+    Drupal.tableHeaderHeaders.push(headerClone);
 
     // Store parent table.
     var table = $(this).parent('table')[0];
@@ -91,7 +91,7 @@ Drupal.behaviors.tableHeader = function 
 
   // Track scrolling.
   Drupal.tableHeaderOnScroll = function() {
-    $(headers).each(function () {
+    $(Drupal.tableHeaderHeaders).each(function () {
       tracker(this);
     });
   };
