Created
March 21, 2021 19:11
-
-
Save joehonton/eb169644c36e508835985a5e8a77e215 to your computer and use it in GitHub Desktop.
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
const observer = new IntersectionObserver((entries) => { | |
if (entries[0].isIntersecting == true) { | |
fetchNextArticle(); | |
} | |
}, {threshold: 0}); | |
const bottomOfPage = document.querySelect('#bottom-of-page'); | |
observer.observe(bottomOfPage); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment