Spaces:
Running

puff-palace / script.js
dreamski's picture
make me a cigarette page
b3786e2 verified
Raw History Blame Contribute Delete
657 Bytes
document.addEventListener('DOMContentLoaded', function() {
// Initialize animations
const animatedElements = document.querySelectorAll('.fade-in, .slide-up');
animatedElements.forEach((el, index) => {
// Stagger animations
el.style.animationDelay = `${index * 0.1}s`;
});
// Handle cart buttons
const addToCartButtons = document.querySelectorAll('[data-add-to-cart]');
addToCartButtons.forEach(button => {
button.addEventListener('click', function() {
const product = this.getAttribute('data-product');
alert(`Added ${product} to your cart`);
});
});
});