Increase navbar sticky line

This commit is contained in:
Helen Chong 2024-04-18 22:26:11 +08:00
parent 837e5e947a
commit 9d550cae71
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@
window.addEventListener("scroll", () => { window.addEventListener("scroll", () => {
const scrollPosition = window.scrollY || document.documentElement.scrollTop; const scrollPosition = window.scrollY || document.documentElement.scrollTop;
const stickyLine = hero.scrollHeight - navbar.scrollHeight; const stickyLine = hero.scrollHeight - navbar.scrollHeight;
if (scrollPosition > stickyLine + 55) { if (scrollPosition > stickyLine + 100) {
navbar.classList.add("nav--sticky"); navbar.classList.add("nav--sticky");
} else { } else {
navbar.classList.remove("nav--sticky"); navbar.classList.remove("nav--sticky");