CoolFace
Apppublic

Sanhungou/drone-fpv-builder-pro

sourceHugging Faceupdated 10mo agoView on Hugging Face
0likes
script.js24 linesDownload Raw Back to root
1// Mobile menu toggle functionality2document.addEventListener('DOMContentLoaded', function() {3    // Toggle mobile menu4    const mobileMenuButton = document.querySelector('#mobileMenuButton');5    const mobileMenu = document.querySelector('#mobileMenu');6    7    if (mobileMenuButton) {8        mobileMenuButton.addEventListener('click', function() {9            mobileMenu.classList.toggle('hidden');10            feather.replace();11        });12    }13    14    // Smooth scrolling for anchor links15    document.querySelectorAll('a[href^="#"]').forEach(anchor => {16        anchor.addEventListener('click', function(e) {17            e.preventDefault();18            19            document.querySelector(this.getAttribute('href')).scrollIntoView({20                behavior: 'smooth'21            });22        });23    });24});
Sanhungou/drone-fpv-builder-pro · CoolFace