Spaces:
Running
Running
Download assets/js/script.js from akhaliq/coffee-animate-example: direct link, hf CLI and curl.
- Browser
- Download file 459 Bytes
-
https://huggingface.co/spaces/akhaliq/coffee-animate-example/resolve/main/assets/js/script.js
- Command line
-
hf download hf://spaces/akhaliq/coffee-animate-example/assets/js/script.js
-
curl -L -o script.js https://huggingface.co/spaces/akhaliq/coffee-animate-example/resolve/main/assets/js/script.js
459 Bytes
| document.addEventListener('DOMContentLoaded', function() { | |
| const navLinks = document.querySelectorAll('nav a'); | |
| navLinks.forEach(link => { | |
| link.addEventListener('click', function(e) { | |
| e.preventDefault(); | |
| const targetId = this.getAttribute('href').substring(1); | |
| const targetSection = document.getElementById(targetId); | |
| targetSection.scrollIntoView({ behavior: 'smooth' }); | |
| }); | |
| }); | |
| }); |