CoolFace
Apppublic

Gray1012/circuitspark-ai-solutions

sourceHugging Faceupdated 11mo agoView on Hugging Face
0likes
script.js32 linesDownload Raw Back to root
1 2// Circuit board animation3function initCircuitAnimation() {4  const logo = document.querySelector('.logo-img');5  if (logo) {6    logo.addEventListener('mouseover', () => {7      logo.style.animation = 'circuitGlow 0.5s infinite alternate';8    });9    logo.addEventListener('mouseout', () => {10      logo.style.animation = 'circuitGlow 2s infinite alternate';11    });12  }13}14 15// Shared JavaScript functionality16document.addEventListener('DOMContentLoaded', () => {17    initCircuitAnimation();18// Smooth scrolling for anchor links19    document.querySelectorAll('a[href^="#"]').forEach(anchor => {20        anchor.addEventListener('click', function (e) {21            e.preventDefault();22            document.querySelector(this.getAttribute('href')).scrollIntoView({23                behavior: 'smooth'24            });25        });26    });27 28    // Dynamic year for footer29    document.querySelectorAll('.current-year').forEach(el => {30        el.textContent = new Date().getFullYear();31    });32});