34146-vm/assets/js/main.js
Flatlogic Bot d8875292fa Order form
2025-09-17 13:07:03 +00:00

20 lines
626 B
JavaScript

document.addEventListener('DOMContentLoaded', () => {
const observerOptions = {
root: null,
rootMargin: '0px',
threshold: 0.1
};
const observer = new IntersectionObserver((entries, observer) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
observer.unobserve(entry.target);
}
});
}, observerOptions);
const hiddenElements = document.querySelectorAll('.hidden-left, .hidden-right, .hidden-bottom');
hiddenElements.forEach(el => observer.observe(el));
});