Entry
Is it possible to detect the use of a mouse scroll wheel with JavaScript??
Apr 15th, 2005 08:39
HeadCircus, Katharina Andresen,
wheel scroll is still just a scroll, so onscroll captures it.
window.onscroll = doThis;
function doThis(e){
//do
// e is the event
}
This url seems to indicate the html element support for this method:
http://www.blooberry.com/indexdot/html/tagpages/attributes/onscroll.htm
window is not listed, but if body has it, window has it as in the
example above.
Just make sure to have no arguments in the function call. The event
can be called if you want to capture that and do something with it,
etc...