diff --git a/misc/tableheader.js b/misc/tableheader.js
index 9d05e23..d8ed81f 100644
--- a/misc/tableheader.js
+++ b/misc/tableheader.js
@@ -11,6 +11,11 @@ Drupal.behaviors.tableHeader = function (context) {
     return;
   }
 
+  // If there are no sticky tables in this context, just return.
+  if (!$('table.sticky-enabled', context).size()) {
+    return;
+  }
+
   // Keep track of all cloned table headers.
   var headers = [];
 
