Remove event parameter

This commit is contained in:
Leilukin 2024-04-18 13:18:57 +08:00 committed by Helen Chong
parent 257ee90ad9
commit 70adf44cff

View File

@ -64,7 +64,7 @@
// Make the navigation bar sticky
// const hero = document.querySelector(".hero");
const navbar = document.querySelector(".navbar");
window.addEventListener("scroll", e => {
window.addEventListener("scroll", () => {
const scrollPos = window.scrollY || document.documentElement.scrollTop;
const stickyLine = hero.scrollHeight - navbar.scrollHeight;
if (scrollPos > stickyLine) {