jquery Programming Glossary: event.wheeldelta
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 the doScroll method document.documentElement.onmousewheel function if document.body.doScroll document.body.doScroll event.wheelDelta 0 left right return false This will scroll the horizontal bar by the amount the vertical bar would normally scroll by. Other.. code below. var mouseWheelEvt function e var event e window.event if document.body.doScroll document.body.doScroll event.wheelDelta 0 left right else if event.wheelDelta event.detail 0 document.body.scrollLeft 10 else document.body.scrollLeft 10 return.. e var event e window.event if document.body.doScroll document.body.doScroll event.wheelDelta 0 left right else if event.wheelDelta event.detail 0 document.body.scrollLeft 10 else document.body.scrollLeft 10 return false if onmousewheel in document.body..
Catch scrolling event on overflow:hidden element http://stackoverflow.com/questions/8378243/catch-scrolling-event-on-overflowhidden-element lost so you must create it yourself. To do this you can set a mousewheel listener on your div in question and use the event.wheelDelta property to check whether the user is scrolling up or down. This value is different according to browser but it is generally..
event.wheelDelta returns undefined http://stackoverflow.com/questions/8886281/event-wheeldelta-returns-undefined returns undefined So I'm trying to disable scrolling on my page when my lightbox opens and I found this really usefull.. own page it disabled scrolling in my lightbox as well. I started to debug the code with alerts only to find out that event.wheelDelta returns undefined on my page while in the JSFiddle it returns 120. javascript jquery scrolling share improve this question..
|