Download script.js from cherkif/swiftdrop-express-couriers: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/spaces/cherkif/swiftdrop-express-couriers/resolve/main/script.js
- Command line
-
hf download hf://spaces/cherkif/swiftdrop-express-couriers/script.js
-
curl -L -o script.js https://huggingface.co/spaces/cherkif/swiftdrop-express-couriers/resolve/main/script.js
1.1 kB
| // Mobile menu toggle functionality | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Smooth scroll for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| const targetId = this.getAttribute('href'); | |
| if (targetId === '#') return; | |
| const targetElement = document.querySelector(targetId); | |
| if (targetElement) { | |
| window.scrollTo({ | |
| top: targetElement.offsetTop - 80, | |
| behavior: 'smooth' | |
| }); | |
| } | |
| }); | |
| }); | |
| // Initialize tooltips if using any | |
| if (typeof tippy !== 'undefined') { | |
| tippy('[data-tippy-content]', { | |
| arrow: true, | |
| animation: 'shift-away' | |
| }); | |
| } | |
| }); | |
| // Form submission handling | |
| const contactForm = document.getElementById('contactForm'); | |
| if (contactForm) { | |
| contactForm.addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| // Add your form submission logic here | |
| alert('Merci pour votre message! Nous vous contacterons bientôt.'); | |
| this.reset(); | |
| }); | |
| } |