Skip to content

Instantly share code, notes, and snippets.

@colinrotherham
Created July 15, 2014 09:29
Show Gist options
  • Save colinrotherham/6a589ec2ce00b27e6338 to your computer and use it in GitHub Desktop.
Save colinrotherham/6a589ec2ce00b27e6338 to your computer and use it in GitHub Desktop.
Cancel a scroll animation (e.g. you don't need to fight against JS trying to scroll you up/down)
// Use these events to cancel a scroll in progress
var scrollEvents = 'scroll mousedown DOMMouseScroll mousewheel keyup touchstart pointerdown MSPointerDown';
@gbrigens
Copy link

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment