JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
<footer></footer>
CSS
div {
height: 1000px;
}
footer {
height: 300px;
background: blue;
width: 100%;
}
JavaScript
window.onscroll = function(ev) {
if ($(window).scrollTop() >= $(document).height() - $(window).height() - $('footer').height()) {
alert("you're at the top of the footer");
}
};