diff --git a/13 - Slide in on Scroll/index-START.html b/13 - Slide in on Scroll/index-START.html index 12591bad30..0b9fb8fccb 100644 --- a/13 - Slide in on Scroll/index-START.html +++ b/13 - Slide in on Scroll/index-START.html @@ -58,26 +58,6 @@

Slide in on Scroll

}; } - const sliderImages = document.querySelectorAll('.slide-in'); - - function checkSlide(e) { - sliderImages.forEach(sliderImage => { - // half way through the image - const slideInAt = (window.scrollY + window.innerHeight) - sliderImage.height / 2; - // bottom of the image - const imageBottom = sliderImage.offsetTop + sliderImage.height; - const isHalfShown = slideInAt > sliderImage.offsetTop; - const isNotScrolledPast = window.scrollY < imageBottom; - if (isHalfShown && isNotScrolledPast) { - sliderImage.classList.add('active'); - } else { - sliderImage.classList.remove('active'); - } - }); - } - - window.addEventListener('scroll', debounce(checkSlide)); -