function onWheel(e) { var delta = e.deltaY || e.detail || e.wheelDelta; console.log(delta); }; window.addEventListener('wheel', onWheel); window.addEventListener('mousewheel', onWheel); window.addEventListener('MozMousePixelScroll', onWheel);