Scroll To Top

Enter a query to search our site. Note that you can use "*" and "?" as wildcards. Enclosing more than one word in double quotes ("CSS Layout") will search for the exact phrase.

PVII Knowledge Base

1. Select a product ...
2. Select category ...
3. Search the Knowledge Base...

Question #91

Is it possible to control the GeeWizz scroller with the mouse wheel?

The Answer

Prepared Oct. 2002 by Gerry Jacobsen, PVII

Currently, the mousewheel event is only supported by IE6. But if you do want to add that type of functionality, you can. You would place an event handler on the <div> tag of the content layer that will call a function to start the scroller in the desired direction.

Here's how:

1. Add this new function to your scripts:

function P7_wheelScroll(){
  if (event.wheelDelta >= 120){
  }else if (event.wheelDelta <= -120){

Notice that inside this function there are two different calls to the P7_runScroller function, one to start it moving Up and one Down, these should correspond to the function calls that you actually have on your Up and Down buttons.

2.. To trigger this function, add this function call to the <div> tag of the scrolling layer:

<div id="p7s1content1" onmousewheel="P7_wheelScroll()">

That's it. Now, in a browser that supports the onmousewheel event, currently IE6, the scroller will move Up or Down depending on the direction of the mouse wheel movement. Note, that you will need to click on the scrolling layer first to set the mouse wheel focus to the scroller.

Try it:

Open this Example Page


Back to the questions list