Skip to content

Instantly share code, notes, and snippets.

@bob-lee
Last active November 24, 2017 19:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bob-lee/fef8ae2ca9d9d8bcbe20f5a23f476807 to your computer and use it in GitHub Desktop.
Save bob-lee/fef8ae2ca9d9d8bcbe20f5a23f476807 to your computer and use it in GitHub Desktop.
IntersectionObserver setup 3
// register 'load' event handlers
list.forEach(function(img) {
img.addEventListener('load', function() {
observe(img);
});
});
// Now all set up, let's start loading first two images
indexToObserve = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment