Last active
November 24, 2017 19:05
-
-
Save bob-lee/fef8ae2ca9d9d8bcbe20f5a23f476807 to your computer and use it in GitHub Desktop.
IntersectionObserver setup 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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