Spaces:
Running
Running
Download script.js from youplala/ducai-vision: direct link, hf CLI and curl.
- Browser
- Download file 772 Bytes
-
https://huggingface.co/spaces/youplala/ducai-vision/resolve/main/script.js
- Command line
-
hf download hf://spaces/youplala/ducai-vision/script.js
-
curl -L -o script.js https://huggingface.co/spaces/youplala/ducai-vision/resolve/main/script.js
772 Bytes
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| // Form submission handling | |
| const contactForm = document.querySelector('form'); | |
| if (contactForm) { | |
| contactForm.addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| const formData = new FormData(this); | |
| // Here you would typically send the data to a server | |
| console.log('Form submitted:', Object.fromEntries(formData)); | |
| // Show success message | |
| alert('Merci pour votre message! Je vous répondrai dès que possible.'); | |
| this.reset(); | |
| }); | |
| } |