Published
- 1 min read
javascript scroll up-down event
The solution for this is noted below
javascript scroll up-down event
Solution
window.onwheel = e => {
if(e.deltaY >= 0){
// Scrolling Down with mouse
console.log('Scroll Down');
} else {
// Scrolling Up with mouse
console.log('Scroll Up');
}
}
Run code snippet
Try other methods by searching on the site. That is if this doesn’t work