JSFiddle - React, Tailwind, and code Playground
HTML
<div id="foo"></div>
CSS
#foo {
height: 1200px;
width: 100px;
background-color: black;
}
JavaScript
var animatable = $('body, html');
var animating = false;
animatable.animate( {scrollTop: $('#foo').offset()})
$(window).scroll(function(e) {
if(!animating){
animatable.stop(false, true);
alert('stop scrolling');
}
animating = false;
});