diff --git a/core/misc/tableheader.js b/core/misc/tableheader.js
index 448d0b2..6f61e20 100644
--- a/core/misc/tableheader.js
+++ b/core/misc/tableheader.js
@@ -149,7 +149,7 @@
// Clone the table header so it inherits original jQuery properties.
var $stickyHeader = this.$originalHeader.clone(true);
// Hide the table to avoid a flash of the header clone upon page load.
- this.$stickyTable = $('
')
+ this.$stickyTable = $(document.createElement('table'))
.css({
visibility: 'hidden',
position: 'fixed',
@@ -158,6 +158,13 @@
.append($stickyHeader)
.insertBefore(this.$originalTable);
+ // Copy classes from originalTable, remove undesired classes, and add
+ // sticky-header. Any other classes added to originalTable by modules will
+ // exists in stickyTable to ensure consistent styling.
+ this.$stickyTable.attr('class', this.originalTable.attr('class'));
+ this.$stickyTable.removeClass('sticky-enabled tableheader-processed sticky-table');
+ this.$stickyTable.addClass('sticky-header');
+
this.$stickyHeaderCells = $stickyHeader.find('> tr > th');
// Initialize all computations.