CoolFace
Apppublic

SparGeorgia/neuralforge-ai-studio

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes
script.js24 linesDownload Raw Back to root
1// Smooth scrolling for anchor links2document.querySelectorAll('a[href^="#"]').forEach(anchor => {3    anchor.addEventListener('click', function (e) {4        e.preventDefault();5        document.querySelector(this.getAttribute('href')).scrollIntoView({6            behavior: 'smooth'7        });8    });9});10 11// Intersection Observer for animations12const observer = new IntersectionObserver((entries) => {13    entries.forEach(entry => {14        if (entry.isIntersecting) {15            entry.target.classList.add('animate-fadeIn');16        }17    });18}, {19    threshold: 0.120});21 22document.querySelectorAll('.animate-on-scroll').forEach(el => {23    observer.observe(el);24});