Spaces:
Running
Running
Download script.js from rtmpts/gorpcore-galaxy: direct link, hf CLI and curl.
- Browser
- Download file 1.18 kB
-
https://huggingface.co/spaces/rtmpts/gorpcore-galaxy/resolve/main/script.js
- Command line
-
hf download hf://spaces/rtmpts/gorpcore-galaxy/script.js
-
curl -L -o script.js https://huggingface.co/spaces/rtmpts/gorpcore-galaxy/resolve/main/script.js
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)'; | |
| }); | |
| }); | |
| }); |