SparGeorgia/neuralforge-ai-studio
0
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});