javascript - onmousewheel, on window or document? -


i experimenting scroll events , in few scripts have looked @ found line:

window.onmousewheel = document.onmousewheel = somefunc; 

this working intended, somefunc triggered on scroll. problem chrome triggering function twice (obviously because chrome responding both window , document event). know why both events used, due cross browser compatibility? if so, browser prefer event? choose 1 of events, don't know which.

if have frames in html, not included in document, , mouse wheel event won't triggered.


Comments

Popular posts from this blog

android - questions about switching from C2DM to GCM -

c++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -