Suppose that you have an element with overflow hidden, is it possible to capture mouse scrolls on that element with out scrolling?
The reason I'm asking this is; I have a single page designed website and I wrote a script that automaticlly scrolls to the next position as you scroll down or up. But there is something that I don't want. As they try to scroll, page is actually scrolling in real meaning before function fires on scroll to scroll itself to next position. I'm planning to take body's overflow to hidden and they will see no scrolls but autoscroll.
ex:
HTML
<body>
<div id="blue" class="clicked">
</div>
<div id="red" class="clicked">
</div>
<div id="green" class="clicked">
</div>
</body>
CSS
body{
overflow:hidden;
margin:0;
}
#blue{
background-color:blue;
width:100vw;
height:100vh;
}
#red{
background-color:red;
width:100vw;
height:100vh;
}
#green{
background-color:green;
width:100vw;
height:100vh;
}
JS
$(document).ready(function(){
$(document).scroll(function(){
$('body').animate({'scrollTop':'1000'},3000);
});
});
overflow:hiddendoes), you will need to re-create every single way of scrolling.