0

How can I stop this effect:

I'm scrolling in a div using the mousewheel, and when I reach the bottom of the scroll content, then mousewheel continues the scrolling on the body (or on the first scrollable element, that wraps my div).

James Wiseman
  • 28,429
  • 17
  • 89
  • 155
Burnee
  • 1,991
  • 1
  • 19
  • 26

1 Answers1

0

This continuum scroll also bothers me on websites..

The theory would be something as:
The element you want to scroll, must have an JavaScript event listener of scroll attached to it, so when the scroll is at zero and the user scrolls up you OR the element is scrolled at maximum and the user scrolls down, then you return false

Usign jQuery, something like:

$(".scrollable").scroll(function(){
 // use something like if( $(this).scrollTop() .... ), then return false
});
Fabiano Soriani
  • 6,581
  • 8
  • 40
  • 57