JSFiddle - React, Tailwind, and code Playground
HTML
<div style='height: 5000px; background-color: black'></div>
<div class='animation_image' style='display: none; background-color: red; position: fixed; top:0'>asdasdasdas</div>
JavaScript
$(window).scroll(function() { //detect page scroll
if($(window).scrollTop() + $(window).height() == $(document).height()) //user scrolled to bottom of the page?
{
$('.animation_image').show(); //show loading image
}
else {
$('.animation_image').hide(); //show loading image
}
});