JSFiddle - React, Tailwind, and code Playground
HTML
<div id="wrapper"></div>
CSS
#wrapper {
background: blue;
height: 800px;
width: 100%;
}
JavaScript
jQuery(window).load(function () {
$(window).scroll(function() {
$("#wrapper").css('background', 'red');
clearTimeout($.data(this, 'scrollTimer'));
$.data(this, 'scrollTimer',setTimeout(function() {
$("#wrapper").css('background', 'blue');
}, 250));
});
});