Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Scrolling div and browser window
09-12-2011, 07:33 PM #1
- Join Date
- May 2005
- Thanked 0 Times in 0 Posts
Scrolling div and browser window
Hello, I was wondering if there is a way to prevent the browser window from scrolling when you are scrolling inside an overflow auto div and reach the end of the div's scroll? Right now I have a few people complaining about a div that loads scrolling info on the screen and when they scroll down using the mouse wheel and get to the bottom of the div then the rolling of the mouse wheel starts scrolling the browser window. It would be nice if the browser could see that your cursor is over the div and even though it reaches the end, not scroll the window unless you move the cursor outside of the div that you are currently scrolling.
Any ideas or is this just something we have to deal with?
09-12-2011, 08:33 PM #2
- Join Date
- Jan 2011
- Thanked 9 Times in 9 Posts
You need a custom mousewheel handler that cancels the default behaviour then replicates it for the current element. You can evaluate this script that provides your desired functionality as a by-product.
Last edited by Calvert Tripesi; 09-12-2011 at 08:36 PM.
Users who have thanked Calvert Tripesi for this post: