Spaces:
Running
Running
Download script.js from mtuulio/menuu-masterchef: direct link, hf CLI and curl.
- Browser
- Download file 921 Bytes
-
https://huggingface.co/spaces/mtuulio/menuu-masterchef/resolve/main/script.js
- Command line
-
hf download hf://spaces/mtuulio/menuu-masterchef/script.js
-
curl -L -o script.js https://huggingface.co/spaces/mtuulio/menuu-masterchef/resolve/main/script.js
921 Bytes
| document.addEventListener('DOMContentLoaded', () => { | |
| // Initialize Feather Icons | |
| feather.replace(); | |
| // Intersection Observer for Fade-in Animation | |
| const observerOptions = { | |
| root: null, | |
| rootMargin: '0px', | |
| threshold: 0.1 | |
| }; | |
| const observer = new IntersectionObserver((entries, observer) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| entry.target.classList.add('visible'); | |
| observer.unobserve(entry.target); // Only animate once | |
| } | |
| }); | |
| }, observerOptions); | |
| // Select elements to animate | |
| const animatedElements = document.querySelectorAll('section div.relative, section dl div, section h2, section p'); | |
| animatedElements.forEach(el => { | |
| el.classList.add('fade-in'); | |
| observer.observe(el); | |
| }); | |
| console.log("Menuu Landing Page Loaded Successfully"); | |
| }); |