Files
drmortezaasadi_ir/script.js
2025-08-10 15:28:18 +03:30

18 lines
464 B
JavaScript

document.addEventListener('DOMContentLoaded', function() {
const sections = document.querySelectorAll('.scroll-section');
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
}
});
}, {
threshold: 0.1
});
sections.forEach(section => {
observer.observe(section);
});
});