$(window).scroll(function () {
if ($('.row').is(':visible')) {
alert("ок")
}
});
const onIntersection = (entries) => {
entries.forEach(entry => {
if (entry.intersectionRatio > 0) {
// visible
} else {
// not visible
}
});
};
const observer = new IntersectionObserver(onIntersection);
observer.observe(document.querySelector('#element'));