document.addEventListener("DOMContentLoaded", function () { // Smooth scroll to Semla menu when clicking the order button document.querySelector(".order-btn").addEventListener("click", function (event) { event.preventDefault(); document.querySelector("#semla-menu").scrollIntoView({ behavior: "smooth" }); }); // Fade-in effect for Semla section when scrolling into view let semlaSection = document.querySelector("#semla-menu"); let observer = new IntersectionObserver((entries) => { entries.forEach((entry) => { if (entry.isIntersecting) { entry.target.classList.add("fade-in-visible"); } }); }, { threshold: 0.3 }); observer.observe(semlaSection); }); // CSS for fade-in animation (Injected via JavaScript) const css = ` .fade-in-visible { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; } .fade-in-visible.visible { opacity: 1; transform: translateY(0); } `; const style = document.createElement("style"); style.appendChild(document.createTextNode(css)); document.head.appendChild(style);

mmd admin