Spaces:
Running
Running
File size: 657 Bytes
058d7a3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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'
});
});
});
}); |