Catching Mouse Wheel Scroll inside Non-scrollable Div


Is there a way to catch the scroll event while mouse is positioned over a div that is not scrollable? My intent is to feign scrolling by adjusting top offset until div inside of div is above view then move top offset of inner div to below view of outer div. Kind of like a carousel, but vertical and controlled by scrolling of the mouse wheel. Obviously, to catch scroll events, I would use:

angular.element(elem).find('.divClass').bind('scroll', function(){...});

to handle scrolling that is actually occurring, but I’m interested in when the actual mouse wheel is scrolled much like a keybind.


you can use the onwheel event. see

some browsers use onmousehweel. for a good tutorial see

Answered By – Woncker

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published