Spaces:
Running
Running
| document.addEventListener('DOMContentLoaded', () => { | |
| // Animate cards on scroll | |
| const observer = new IntersectionObserver((entries) => { | |
| entries.forEach(entry => { | |
| if (entry.isIntersecting) { | |
| entry.target.classList.add('animate-fade-in'); | |
| } | |
| }); | |
| }, { threshold: 0.1 }); | |
| document.querySelectorAll('.service-card, infographic-card').forEach(card => { | |
| observer.observe(card); | |
| }); | |
| // Feather icons replacement | |
| feather.replace(); | |
| }); | |
| // Helper function for dynamic content | |
| function toggleAccordion(element) { | |
| element.classList.toggle('active'); | |
| const content = element.nextElementSibling; | |
| if (content.style.maxHeight) { | |
| content.style.maxHeight = null; | |
| } else { | |
| content.style.maxHeight = content.scrollHeight + "px"; | |
| } | |
| } |