--- misc/tableheader.js 2009-10-27 00:12:39.000000000 -0400 +++ misc/tableheader.js 2009-11-09 11:20:17.000000000 -0500 @@ -19,16 +19,22 @@ $('table.sticky-enabled thead', context).once('tableheader', function () { // Clone the table header so it inherits original jQuery properties. Hide // the table to avoid a flash of the header clone upon page load. - var headerClone = $(this).clone(true).hide().insertBefore(this.parentNode).wrap('').parent().css({ + var headerClone = $(this).clone(true).insertBefore(this.parentNode).wrap(document.createElement('table')).parent().css({ position: 'fixed', top: '0px' }); headerClone = $(headerClone)[0]; headers.push(headerClone); + // Set the class on the sticky table. + // Give it the same classes as the table it is the header for, minus sticket-enabled and plus sticky-header + headerClone.className = this.parentNode.className; + $(headerClone).removeClass('sticky-enabled'); + $(headerClone).addClass('sticky-header'); + // Store parent table. var table = $(this).parent('table')[0]; headerClone.table = table; // Finish initializing header positioning.