Spaces:
Running
Running
Download script.js from wolmarsh/promptcraft-prodigy: direct link, hf CLI and curl.
- Browser
- Download file 706 Bytes
-
https://huggingface.co/spaces/wolmarsh/promptcraft-prodigy/resolve/main/script.js
- Command line
-
hf download hf://spaces/wolmarsh/promptcraft-prodigy/script.js
-
curl -L -o script.js https://huggingface.co/spaces/wolmarsh/promptcraft-prodigy/resolve/main/script.js
706 Bytes
| // Main JavaScript file for functionality | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Smooth scroll for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| // Mobile menu toggle functionality will be handled by the navbar component | |
| }); | |
| // Function to format prices | |
| function formatPrice(price) { | |
| return new Intl.NumberFormat('en-US', { | |
| style: 'currency', | |
| currency: 'USD' | |
| }).format(price); | |
| } |