diff options
-rw-r--r-- | _includes/views/header.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/_includes/views/header.html b/_includes/views/header.html index 169bf01..ba707b0 100644 --- a/_includes/views/header.html +++ b/_includes/views/header.html @@ -56,7 +56,7 @@ </header> <script> - (function() { + function initHeader() { var lastScrollY = getScrollPos().y; var documentElement = document.documentElement; @@ -87,5 +87,6 @@ }); storeScrollData(); - })(); + } + document.addEventListener('DOMContentLoaded', initHeader); </script> |