Download script.js from adiiii12/yasiodev-clone-code-coffee: direct link, hf CLI and curl.
- Browser
- Download file 867 Bytes
-
https://huggingface.co/spaces/adiiii12/yasiodev-clone-code-coffee/resolve/main/script.js
- Command line
-
hf download hf://spaces/adiiii12/yasiodev-clone-code-coffee/script.js
-
curl -L -o script.js https://huggingface.co/spaces/adiiii12/yasiodev-clone-code-coffee/resolve/main/script.js
867 Bytes
| mobileMenuButton.addEventListener('click', () => { | |
| navLinks.classList.toggle('hidden'); | |
| navLinks.classList.toggle('flex'); | |
| navLinks.classList.toggle('flex-col'); | |
| navLinks.classList.toggle('absolute'); | |
| navLinks.classList.toggle('top-16'); | |
| navLinks.classList.toggle('right-4'); | |
| navLinks.classList.toggle('bg-gray-800'); | |
| navLinks.classList.toggle('p-4'); | |
| navLinks.classList.toggle('rounded-lg'); | |
| navLinks.classList.toggle('shadow-xl'); | |
| }); | |
| // 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' | |
| }); | |
| }); | |
| }); | |