Skip to content

Instantly share code, notes, and snippets.

@johanneslumpe
Created April 21, 2014 10:08
Show Gist options
  • Save johanneslumpe/11138298 to your computer and use it in GitHub Desktop.
Save johanneslumpe/11138298 to your computer and use it in GitHub Desktop.
Fullsize background videos in webkit browsers gist 4
window.addEventListener('scroll', function (e) {
// unfortunately this will never fire
console.log('we are scrolling!');
}, false);
document.querySelector('body').addEventListener('scroll', function (e) {
// this one will fire though
console.log('yay!');
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment