JSFiddle - React, Tailwind, and code Playground

HTML

<body>
<div>
dzhimgfzeh giom h ezi*gze

gzehioegh 
gez

</div>
<span>
dzhimgfzeh giom h ezi*gze

gzehioegh 
gez

</span>


</body>

CSS

body {
    white-space: nowrap;
    height: 700px;
}

JavaScript

var lastScrollLeft = 0;
$("span").scroll(function() {
    var documentScrollLeft = $(document).scrollLeft();
    if (lastScrollLeft != documentScrollLeft) {
        alert('scroll x');
        lastScrollLeft = documentScrollLeft;
    }
});