JSFiddle - React, Tailwind, and code Playground
by B L Praveen
HTML
<div id="wrapper">
<div id="content">
content. scroll me.
</div>
</div>
CSS
html {
overflow: hidden;
}
body {
position: absolute;
overflow: scroll;
width: 100%;
height: 100%;
}
div#content {
height: 1000px
}
JavaScript
$("body").scroll(function(){
console.log( $("#wrapper").position().top )
})