JSFiddle - React, Tailwind, and code Playground
HTML
<div></div>
JavaScript
$(window).on('mousewheel DOMMouseScroll', function (e) {
var direction = (function () {
var delta = (e.type === 'DOMMouseScroll' ?
e.originalEvent.detail * -40 :
e.originalEvent.wheelDelta);
return delta > 0 ? 0 : 1;
}());
if(direction === 1) {
$('div').html('scrolling down');
}
if(direction === 0) {
$('div').html('scrolling up');
}
});