Jump to content

Is there an Event called (more or less) onScroll?


Betty_S

Recommended Posts

I found this post. It might help. http://www.dynamicdrive.com/forums/archive...php/t-6966.htmlThe gist of the code is as follows:

<html><head><script type="text/javascript">function hanldeScroll(e){   e = (e) ? e : window.event;   var delta = (e.wheelDelta) ? e.wheelDelta : e.detail;   alert(delta);}if(document.attachEvent)    document.attachEvent("onmousewheel", hanldeScroll);else    window.addEventListener("DOMMouseScroll", hanldeScroll, false);</script></head><body>...</body></html>

When I ran a test in the Tryit Editor, IE would alert 120 when I scrolled one direction and -120 when I'd scroll in the other direction. Firefox would alert 3 and -3.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...