Q:

Detect scrolling direction in a page with disabled rubber band effect

html {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body{
    margin: 0;
    min-width: 980px;
    padding: 0; 
    height: 100%;
    width: 100%;
    overflow: auto;
}

This is the css I'm using to prevent macos rubber band scrolling. Also I want to detect the direction of the scroll, down or up.
var iScrollPos = 0;
$(window).scroll(function () {
    var iCurScrollPos = $(this).scrollTop();
    if (iCurScrollPos > iScrollPos) {
        console.log('down');
    } else {
        console.log('up');
    }
    iScrollPos = iCurScrollPos;
});

But $(window) is not a relevant element, because of the CSS. 

A:

I found a solution to disable rubber band scrolling and detect the scrolling direction. 
jquery.mousewheel.js and this js 
$('body').bind('mousewheel', function(event, delta, deltaX, deltaY) {
    if(delta > 0 )
       console.log('up');
    else
       console.log('down');
});

Note: It only detects if the user is using the mouse wheel to scroll the page.

