From 3f727a9e8e9871ca62d08c49e0bb75cbd5c2f3a7 Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:18:57 +0800 Subject: [PATCH] Remove event parameter --- src/_includes/main/navbar.njk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_includes/main/navbar.njk b/src/_includes/main/navbar.njk index cb85b8e5..5daa33c6 100644 --- a/src/_includes/main/navbar.njk +++ b/src/_includes/main/navbar.njk @@ -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) {