Spaces:
Running
Running
| document.addEventListener('DOMContentLoaded', function() { | |
| // Add animation classes to sections | |
| const sections = document.querySelectorAll('section'); | |
| sections.forEach((section, index) => { | |
| section.classList.add('slide-up'); | |
| section.style.animationDelay = `${index * 0.1}s`; | |
| }); | |
| // Smooth scroll for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| }); |