perf: postpone initializing site header
Postpone this step to the stage that DOM loaed, but img and css not
This commit is contained in:
parent
735c2ad48b
commit
4e3e599bbf
1 changed files with 3 additions and 2 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue