mousewheel event is not triggering in firefox browser
Solution 1:
This is 2017 and the right answer is now:
$(window).on('wheel', function(event){
// deltaY obviously records vertical scroll, deltaX and deltaZ exist too
if(event.originalEvent.deltaY < 0){
// wheeled up
}
else {
// wheeled down
}
});
Works with current Firefox 51, Chrome 56, IE9+
Note: The value of the deltas will depend on the browser and the user settings.
Solution 2:
Firefox doesn't recognize "mousewheel" as of version 3. You should use "DOMMouseScroll" instead for firefox.
check this: http://www.javascriptkit.com/javatutors/onmousewheel.shtml
Solution 3:
Use wheel
event. This page also provides polyfills for old browsers https://developer.mozilla.org/en-US/docs/Web/Events/wheel