Scroll event reach max scroll Y

Usefull to know when we reach the end of scroll.

const $box = document.querySelector('scroll-element') $box.addEventListener('scroll', (event) => { const target = const maxScrollY = target.scrollHeight - target.clientHeight if (maxScrollY === target.scrollTop) { // We reach the maximum of scroll Y } })

Stay up to date

Sign up for the mailing list and get notified via email when new blog posts come out.