JSFiddle - React, Tailwind, and code Playground
HTML
<a id = "scroll-to-bottom">Scroll</a>
CSS
body{
height: 500em;
overflow: auto;
}
#scroll-to-bottom{
color: red;
text-decoration: none;
cursor: pointer;
}
#scroll-to-bottom:hover{
color: green;
}
JavaScript
$("#scroll-to-bottom").click(function(){
$("body").animate({
scrollTop: "+=" + $(window).height() * 50
}, 2000);
$(this).fadeOut("slow");
});
$(window).scroll(function(){
if ($(this).scrollTop() === 0)
$("#scroll-to-bottom").fadeIn("slow");
});