1

I am using jQuery 2.0.2. I am able to detect scrolling up mousewheel by using

Panel.bind("mousewheel", function () {});

How to detect mouse scrolling down?

Hoy Cheung
  • 1,552
  • 3
  • 19
  • 36

2 Answers2

2

The mousewheel event returns a delta value, signifying if the mouse wheel was scrolled up or down.

Here's a very good site explaining how to handle mousewheel events in all browsers (Firefox seems to do it a little differently than others):

http://www.sitepoint.com/html5-javascript-mouse-wheel/

There's also a jQuery plugin:

https://github.com/brandonaaron/jquery-mousewheel

Filippos Karapetis
  • 4,367
  • 21
  • 39
0

You can also use jQuery Mouse Wheel Plugin

In order to use the plugin, simply bind the mousewheel event to an element. It also provides two helper methods called mousewheel and unmousewheel that act just like other event helper methods in jQuery. The event callback receives three extra arguments which are the normalized "deltas" of the mouse wheel.

Ravi
  • 853
  • 8
  • 17