javascript Programming Glossary: event.wheeldelta
Detecting mousewheel on the x-axis (left and right) with Javascript http://stackoverflow.com/questions/10821985/detecting-mousewheel-on-the-x-axis-left-and-right-with-javascript wheel event var delta 0 if event event window.event if event.wheelDelta delta event.wheelDelta 120 else if event.detail delta event.detail.. 0 if event event window.event if event.wheelDelta delta event.wheelDelta 120 else if event.detail delta event.detail 3 if delta handle..
How to do a horizontal scroll on mouse wheel scroll? http://stackoverflow.com/questions/2346958/how-to-do-a-horizontal-scroll-on-mouse-wheel-scroll function if document.body.doScroll document.body.doScroll event.wheelDelta 0 left right return false This will scroll the horizontal bar.. if document.body.doScroll document.body.doScroll event.wheelDelta 0 left right else if event.wheelDelta event.detail 0 document.body.scrollLeft.. event.wheelDelta 0 left right else if event.wheelDelta event.detail 0 document.body.scrollLeft 10 else document.body.scrollLeft..
Zoom in on a point (using scale and translate) http://stackoverflow.com/questions/2916081/zoom-in-on-a-point-using-scale-and-translate var mousey event.clientY canvas.offsetTop var wheel event.wheelDelta 120 n or n according to Chris comment var zoom Math.pow 1 Math.abs..
How to fire mouse wheel event in Firefox with JavaScript? http://stackoverflow.com/questions/6735830/how-to-fire-mouse-wheel-event-in-firefox-with-javascript wheel event var delta 0 if event event view.event if event.wheelDelta delta event.wheelDelta 120 else if event.detail delta event.detail.. 0 if event event view.event if event.wheelDelta delta event.wheelDelta 120 else if event.detail delta event.detail 3 alert delta var..
Catch scrolling event on overflow:hidden element http://stackoverflow.com/questions/8378243/catch-scrolling-event-on-overflowhidden-element a mousewheel listener on your div in question and use the event.wheelDelta property to check whether the user is scrolling up or down...
event.wheelDelta returns undefined http://stackoverflow.com/questions/8886281/event-wheeldelta-returns-undefined returns undefined So I'm trying to disable scrolling on my.. to debug the code with alerts only to find out that event.wheelDelta returns undefined on my page while in the JSFiddle it returns..
|