2026-08-07 11:52:31 +00:00

26 lines
677 B
JavaScript

/**
* Страница начальной школы (page-elementary-school.php)
* Reveal-анимации — IntersectionObserver (как на главной).
*/
(function () {
'use strict';
var sections = document.querySelectorAll('.page-elementary-school .reveal');
if (!sections.length || !('IntersectionObserver' in window)) {
return;
}
var observer = new IntersectionObserver(function (entries) {
entries.forEach(function (entry) {
if (entry.isIntersecting) {
entry.target.classList.add('is-visible');
observer.unobserve(entry.target);
}
});
}, { threshold: 0.12 });
sections.forEach(function (el) {
observer.observe(el);
});
})();