JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
<p>user has <span>not</span> scrolled</p>
CSS
div {
background: lightpink;
padding-bottom: 1500px;
}
p {
position: fixed;
top: 0;
left: 0;
}
span {
font-weight: bold;
}
JavaScript
$(document).scroll( function(){
$('p').text('user has scrolled');
});