Spaces:
Running
Running
File size: 845 Bytes
0398dc6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
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";
}
} |