From 6b3279642dc6588df1d39ce008b5ba5603aa0968 Mon Sep 17 00:00:00 2001 From: Helen Chong <119173961+helenclx@users.noreply.github.com> Date: Fri, 12 Apr 2024 00:45:54 +0800 Subject: [PATCH] Declare navbar variable --- src/_includes/main/navbar.webc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_includes/main/navbar.webc b/src/_includes/main/navbar.webc index dee7e505..6adde9dd 100644 --- a/src/_includes/main/navbar.webc +++ b/src/_includes/main/navbar.webc @@ -64,7 +64,7 @@ // Make the navigation bar sticky // const header = document.querySelector(".main-header"); - // const navbar = document.querySelector("navbar"); + const navbar = document.querySelector("navbar"); window.addEventListener("scroll", e => { const scrollPos = window.scrollY || document.documentElement.scrollTop; const stickyLine = document.querySelector(".main-header").scrollHeight - navbar.scrollHeight;