diff --git a/assets/js/hero.js b/assets/js/hero.js index feee380..730df0b 100644 --- a/assets/js/hero.js +++ b/assets/js/hero.js @@ -264,6 +264,17 @@ document.addEventListener("DOMContentLoaded", () => { sections.forEach((section) => observer.observe(section)); + // Hide scroll indicator when footer is visible + const footerEl = document.querySelector("footer.page-footer"); + if (footerEl && scrollIndicator) { + const footerObserver = new IntersectionObserver((entries) => { + entries.forEach((entry) => { + scrollIndicator.style.opacity = entry.isIntersecting ? "0" : ""; + }); + }, { threshold: 0.05 }); + footerObserver.observe(footerEl); + } + // ============ SMOOTH SCROLL (Navbar) ============ document.querySelectorAll('a[href^="#"]').forEach((anchor) => { anchor.addEventListener("click", function (e) {