gorpcore-galaxy / script.js
rtmpts's picture
Sales website with SEO content for Gorpcored clothes. White styled
bf865b4 verified
Raw History Blame Contribute Delete
1.18 kB
document.addEventListener('DOMContentLoaded', function() {
// Initialize animations
const animateElements = document.querySelectorAll('.animate-fade-in');
animateElements.forEach((el, index) => {
el.style.animationDelay = `${index * 0.1}s`;
});
// Newsletter form handling
const newsletterForm = document.querySelector('form');
if (newsletterForm) {
newsletterForm.addEventListener('submit', function(e) {
e.preventDefault();
const email = this.querySelector('input[type="email"]').value;
// Here you would typically send the email to your backend
alert('Thanks for subscribing! Check your email for confirmation.');
this.reset();
});
}
// Product card interactions
const productCards = document.querySelectorAll('.product-card');
productCards.forEach(card => {
card.addEventListener('mouseenter', function() {
this.querySelector('img').style.transform = 'scale(1.05)';
});
card.addEventListener('mouseleave', function() {
this.querySelector('img').style.transform = 'scale(1)';
});
});
});