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:
blake committed 2025-11-20 09:13:42 -06:00
1 parent 04b6d1f509
commit b2852151f4
5 files changed
+21 -5

No files matched your search

+8
View File
@@ -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 };