--- misc/tableheader.js 2009-12-18 03:17:26.000000000 -0500
+++ misc/tableheader.js 2010-03-25 10:06:23.000000000 -0400
@@ -16,15 +16,21 @@
$('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).hide().insertBefore(this.parentNode).wrap(document.createElement('table')).parent().css({
position: 'fixed',
top: '0px'
});
headerClone = $(headerClone)[0];
+ // 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.