Line 100: | Line 100: | ||
let headerHeight = $("header").height(); | let headerHeight = $("header").height(); | ||
− | var h = document.getElementById('topHeader'); | + | // var h = document.getElementById('topHeader'); |
− | height = h.clientHeight; | + | // height = h.clientHeight; |
+ | var height=0.7*pageHeight-headerHeight+5; | ||
let header = document.querySelector('header'); | let header = document.querySelector('header'); | ||
let logoHolder = document.querySelector('.logoHolder'); | let logoHolder = document.querySelector('.logoHolder'); | ||
Line 108: | Line 109: | ||
logoHolder.classList.toggle('sticky', window.scrollY > height); | logoHolder.classList.toggle('sticky', window.scrollY > height); | ||
menuBtn.classList.toggle('sticky', window.scrollY > height); | menuBtn.classList.toggle('sticky', window.scrollY > height); | ||
− | |||
}); | }); | ||
Revision as of 06:36, 6 August 2021