/ Published in: JavaScript
Works on every modern Browser, including Firefox. Requires JQuery.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(document).unbind('mousewheel DOMMouseScroll').on('mousewheel DOMMouseScroll', function(event) { var delta = event.originalEvent.detail < 0 || event.originalEvent.wheelDelta > 0 ? 1 : -1; if (delta < 0) { // scroll down } else { // scroll up } return false; });