Remove event parameter

This commit is contained in:
Helen Chong 2024-04-18 13:18:57 +08:00
parent dbfdf9a6fd
commit 3f727a9e8e
1 changed files with 1 additions and 1 deletions

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) {