These events allow you to monitor the user’s scolling.
Test | IE 5.5 | IE 6 | IE 7 | IE8 | IE9 | IE10 pr2 | FF 7.0 Win | FF 6.1 Mac | Saf 5.1 Win | Saf 5.1 Mac | Chrome 14 Win | Chrome 13 Mac | Opera 11.51 Win | Opera 11.51 Mac |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
On the window
|
Yes | Yes | Yes | Yes | Yes | |||||||||
Is the scroll event available on the window? |
||||||||||||||
On the document
|
No | Yes | Yes | Yes | Yes | Yes | ||||||||
Is the scroll event available on the document?
|
||||||||||||||
On any element with
overflow: auto |
Yes | Yes | Yes | Yes | Yes | |||||||||
Is the scroll event available on elements with |
||||||||||||||
Event bubbling
“No” is the correct answer
The scroll event does not bubble up. |
No | No | No | No | No | |||||||||
Although the event does not bubble, browsers fire a scroll event on both document and window when the user scrolls the entire page. |
||||||||||||||
Test | IE 5.5 | IE 6 | IE 7 | IE8 | IE9 | IE10 pr2 | FF 7.0 Win | FF 6.1 Mac | Saf 5.1 Win | Saf 5.1 Mac | Chrome 14 Win | Chrome 13 Mac | Opera 11.51 Win | Opera 11.51 Mac |
Mousewheel and wheel fire when you use the mousewheel or trackpad. You can prevent the default.
Test | IE 5.5 | IE 6 | IE 7 | IE8 | IE9 | IE10 pr2 | FF 7.0 Win | FF 6.1 Mac | Saf 5.1 Win | Saf 5.1 Mac | Chrome 14 Win | Chrome 13 Mac | Opera 11.51 Win | Opera 11.51 Mac |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
On the window
|
No | No | Yes | Yes | Yes | |||||||||
Is this event available on the window? |
||||||||||||||
On the document
|
No | Yes | Buggy | Yes | No | Yes | Yes | Yes | ||||||
Is this event available on the document?
|
||||||||||||||
On any element with scrollbars
|
No | Yes | Buggy | Yes | No | Yes | Yes | Yes | ||||||
Is this event available on any element with scrollbars?
|
||||||||||||||
Test | IE 5.5 | IE 6 | IE 7 | IE8 | IE9 | IE10 pr2 | FF 7.0 Win | FF 6.1 Mac | Saf 5.1 Win | Saf 5.1 Mac | Chrome 14 Win | Chrome 13 Mac | Opera 11.51 Win | Opera 11.51 Mac |
Bubbles
The mousewheel event should bubble up. |
Untest |
Yes | Untest |
Yes | Yes | Yes | ||||||||
Cancel bubble
The bubbling can be canceled. |
Untest |
Yes | Untest |
Yes | Yes | Yes | ||||||||
Prevent default
The default (scroll element) can be prevented. |
Untest |
Yes | Buggy | Yes | Untest |
Yes | Yes | Yes | ||||||
|
||||||||||||||
wheel event
Equivalent of mousewheel | No | Yes | No | No | No | No | ||||||||
Only works with addEventListener. |
||||||||||||||
Test | IE 5.5 | IE 6 | IE 7 | IE8 | IE9 | IE10 pr2 | FF 7.0 Win | FF 6.1 Mac | Saf 5.1 Win | Saf 5.1 Mac | Chrome 14 Win | Chrome 13 Mac | Opera 11.51 Win | Opera 11.51 Mac |
If a mousewheel event handler is defined on an element in IE8, using the mouse wheel does not scroll the element. The event fires correctly, though. In other words, IE8 always prevents the default of the mousewheel event.