Spaces:
Running
Running
Download script.js from Sewoda/mediaflow-pro: direct link, hf CLI and curl.
- Browser
- Download file 759 Bytes
-
https://huggingface.co/spaces/Sewoda/mediaflow-pro/resolve/main/script.js
- Command line
-
hf download hf://spaces/Sewoda/mediaflow-pro/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Sewoda/mediaflow-pro/resolve/main/script.js
759 Bytes
| 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 | |
| const mobileMenuButton = document.getElementById('mobile-menu-button'); | |
| const mobileMenu = document.getElementById('mobile-menu'); | |
| if(mobileMenuButton && mobileMenu) { | |
| mobileMenuButton.addEventListener('click', function() { | |
| mobileMenu.classList.toggle('hidden'); | |
| }); | |
| } | |
| }); |