document.addEventListener('DOMContentLoaded', function () {
function initTopBannerScrollLock() {
if (window.innerWidth > 767) return;
const areas = document.querySelectorAll('.yefe-top-slider .swiper-slide-inner');
if (!areas.length) return;
areas.forEach(function (area) {
['touchstart', 'touchmove', 'touchend', 'mousedown', 'mousemove', 'mouseup'].forEach(function (ev) {
area.addEventListener(ev, function (e) {
// נותן לאיזור הפנימי להתמודד עם האירוע,
// ולא נותן לו לעלות לסליידר עצמו
e.stopPropagation();
}, { capture: true });
});
});
}
initTopBannerScrollLock();
window.addEventListener('resize', initTopBannerScrollLock);
});