JSFiddle - React, Tailwind, and code Playground
by ult_combo
HTML
<div id="notice" style="position: fixed; top: 0; left: 0"></div>
<div style="height: 4000px; background-color: yellow;">
JavaScript
$(window).scroll(function () {
$("#notice").html("top: " + $(window).scrollTop() + ", height: " + $(document).height());
if (($(window).scrollTop()) > ($(document).height() / 2)) {
$("#notice").html("over half way");
}
});