I\'m looking for something to this effect:
$(window).scroll(function(event){
if (/* magic code*/ ){
// upscroll code
} else {
// downscrol
Since bind has been deprecated on v3 ("superseded by on") and wheel is now supported, forget wheelDelta
:
$(window).on('wheel', function(e) {
if (e.originalEvent.deltaY > 0) {
console.log('down');
} else {
console.log('up');
}
if (e.originalEvent.deltaX > 0) {
console.log('right');
} else {
console.log('left');
}
});