diff --git a/core/misc/tableheader.js b/core/misc/tableheader.js
index 901b650..e2b9500 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 = $(document.createElement('table'))
+ this.$stickyTable = $('
')
.css({
visibility: 'hidden',
position: 'fixed',
@@ -158,9 +158,8 @@
// 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.
- .attr('class', this.$originalTable.attr('class'))
+ .addClass(this.$originalTable.attr('class'))
.removeClass('sticky-enabled tableheader-processed sticky-table')
- .addClass('sticky-header')
.append($stickyHeader)
.insertBefore(this.$originalTable);