Spaces:
Running
Running
Download script.js from CSNET/webalance-fit-core: direct link, hf CLI and curl.
- Browser
- Download file 699 Bytes
-
https://huggingface.co/spaces/CSNET/webalance-fit-core/resolve/main/script.js
- Command line
-
hf download hf://spaces/CSNET/webalance-fit-core/script.js
-
curl -L -o script.js https://huggingface.co/spaces/CSNET/webalance-fit-core/resolve/main/script.js
699 Bytes
| document.addEventListener('DOMContentLoaded', () => { | |
| // Initialize Feather Icons | |
| feather.replace(); | |
| // Intersection Observer for Scroll Animations | |
| 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('animate-fade-in'); | |
| observer.unobserve(entry.target); | |
| } | |
| }); | |
| }, observerOptions); | |
| // Target elements to animate | |
| const animatedElements = document.querySelectorAll('section > div, .bg-white, .group'); | |
| animatedElements.forEach(el => observer.observe(el)); | |
| }); |