orangefest-vibes / script.js
tccaa's picture
Promote version 98d695d to main
6f36a22 verified
Raw History Blame Contribute Delete
855 Bytes
document.addEventListener('DOMContentLoaded', function() {
// 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'
});
});
});
// Animation for action cards
const cards = document.querySelectorAll('.action-card');
cards.forEach((card, index) => {
card.style.opacity = '0';
card.style.transform = 'translateY(20px)';
card.style.transition = 'opacity 0.5s ease, transform 0.5s ease';
setTimeout(() => {
card.style.opacity = '1';
card.style.transform = 'translateY(0)';
}, 200 * index);
});
});