--- misc/tableheader.js 2009-09-20 15:14:40.000000000 -0400 +++ misc/tableheader.js 2009-09-28 13:32:11.000000000 -0400 @@ -18,16 +18,22 @@ var headers = []; $('table.sticky-enabled thead', context).once('tableheader', function () { // Clone thead so it inherits original jQuery properties. - var headerClone = $(this).clone(true).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.