The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I want to disable mousewheel scrolling when the cursor is over a div, and re-enable mousewheel scrolling when it leaves the div. How can i achieve this?
I don’t believe this is possible. You could potentially look into preventing page scrolling period though.
You can, here you go:
Whenever the cursor is above the div, that div receives the mousewheel event before the rest of the page. Just preventDefault() and no scrolling will happen.
Be aware that my code uses the jQuery mousewheel plugin:
It can also be done with native JS, but that would be your job to find the neccessary code .