Reputation: 1
I need to identify when user is scrolling on my website. I think the javascript I'm running is having conflicts with the scroll-snap-type
I've tried playing around with the container height. If i make the height 100%, the javascript works, but the scroll snap does not.
code can be found here https://jsfiddle.net/raylthomas/kw6bn2a8/2/
window.onscroll = ()=> console.log("Scrolling...");
Upvotes: 0
Views: 278
Reputation: 238
The conflict is due to the "overflow" rule, which is necessary for scroll-snap. My solution is to check for mousewheel activity by using window.onwheel()
Upvotes: 1