CoolFace
Apppublic

davisdec/the-dramatic-truth-studio

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes
script.js33 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 scroll animations12const observerOptions = {13    threshold: 0.114};15 16const observer = new IntersectionObserver((entries) => {17    entries.forEach(entry => {18        if (entry.isIntersecting) {19            entry.target.classList.add('animate-fade-in');20            observer.unobserve(entry.target);21        }22    });23}, observerOptions);24 25document.querySelectorAll('.animate-on-scroll').forEach(element => {26    observer.observe(element);27});28// Initialize feather icons29document.addEventListener('DOMContentLoaded', () => {30    feather.replace();31});32 33