9

I'd like to detect when a user has stopped scrolling a page/element. This may be tricky as recently enhancements to OSX's scrolling behaviour creates this new inertia effect. Is there an event fired?

The only other solution I can think of is using a interval to pick up when the scroll position of a page/element no longer changes, for example:

var element     = $( el );
var previous    = element.scrollLeft();
var current;

element.scroll( function(event)
{
    current = element.scrollLeft();

    if ( current === previous )
    {
        // user has stopped scrolling
    }

    previous    = current;
});
Ahmed Nuaman
  • 12,662
  • 15
  • 55
  • 87

0 Answers0