Download script.js from Elfiroh/management-evolution-pro: direct link, hf CLI and curl.
- Browser
- Download file 1.47 kB
-
https://huggingface.co/spaces/Elfiroh/management-evolution-pro/resolve/main/script.js
- Command line
-
hf download hf://spaces/Elfiroh/management-evolution-pro/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Elfiroh/management-evolution-pro/resolve/main/script.js
1.47 kB
| document.addEventListener('DOMContentLoaded', function() { | |
| // Initialize feather icons | |
| if (typeof feather !== 'undefined') { | |
| feather.replace(); | |
| } | |
| // Animate elements on scroll | |
| const animateOnScroll = () => { | |
| const elements = document.querySelectorAll('.fade-in, .slide-in-left, .slide-in-right'); | |
| elements.forEach(element => { | |
| const elementTop = element.getBoundingClientRect().top; | |
| const windowHeight = window.innerHeight; | |
| if (elementTop < windowHeight - 100) { | |
| element.style.opacity = '1'; | |
| element.style.transform = 'translate(0)'; | |
| } | |
| }); | |
| }; | |
| // Initialize animations | |
| window.addEventListener('scroll', animateOnScroll); | |
| animateOnScroll(); | |
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function(e) { | |
| e.preventDefault(); | |
| const targetId = this.getAttribute('href'); | |
| if (targetId === '#') return; | |
| const targetElement = document.querySelector(targetId); | |
| if (targetElement) { | |
| targetElement.scrollIntoView({ | |
| behavior: 'smooth', | |
| block: 'start' | |
| }); | |
| } | |
| }); | |
| }); | |
| // Mobile menu toggle functionality will be handled in the header component | |
| }); |