Fixed issue where the mobile navigation didn't close after a link was clicked. Also added Hope Food Pantry as a new project.
This commit is contained in:
1 parent
04b6d1f509
commit
b2852151f4
5 files changed
+21
-5
No files matched your search
@@ -8,6 +8,14 @@ btnNavEl.addEventListener("click", function () {
|
||||
headerEl.classList.toggle("nav-open");
|
||||
});
|
||||
|
||||
const navLinks = document.querySelectorAll(".main-nav-link");
|
||||
|
||||
navLinks.forEach((link) => {
|
||||
link.addEventListener("click", () => {
|
||||
headerEl.classList.remove("nav-open");
|
||||
});
|
||||
});
|
||||
|
||||
// Scroll Animations
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const observerOptions = { root: null, rootMargin: "0px", threshold: 0.5 };
|
||||
|
||||
Reference in new issue
Block a user