pixelcraft-studio / script.js
jacodejong's picture
Please remove the mailform.
4d17102 verified
Raw History Blame Contribute Delete
537 Bytes
// Intersection Observer for scroll animations
const observerOptions = {
threshold: 0.1
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('animate-fade-in');
observer.unobserve(entry.target);
}
});
}, observerOptions);
document.querySelectorAll('.animate-on-scroll').forEach(element => {
observer.observe(element);
});
});