Return to Snippet

Revision: 70316
at January 12, 2016 20:42 by lapinblancuk


Initial Code
$(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;
        });

Initial URL


Initial Description
Works on every modern Browser, including Firefox. Requires JQuery.

Initial Title
MouseWheel scroll in JS with JQuery

Initial Tags


Initial Language
JavaScript