PDA

View Full Version : window.onscroll


blindchild
03-21-2009, 08:08 PM
Hello all,

I am reading about window.onscroll and may want to include it in a little project I am working on. But I am wondering is it possible to detect which direction the user is scrolling? Also does the command work for mousewheels?

Thanks

Ross

Clueful
03-21-2009, 09:28 PM
I am wondering is it possible to detect which direction the user is scrolling?Yes - you read the effect upon the displacement of the document.Also does the command work for mousewheels?Yes the event is fired when the page scrolls, regardless of which user-input caused it.

blindchild
03-21-2009, 10:34 PM
Awesome stuff. Thanks for getting back to me.

Do you happen to know of any further reading about reading the displacement of the document. I have had a look around online and have yet to find anything about using the .onscroll event to read the direction in which the user is scrolling. I have only managed to find examples which cause a popup when the user is scrolling, regardless of which direction they are scrolling....

Thanks again

R