Spaces:
Running

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