Last active
November 27, 2016 17:47
-
-
Save kylehill/0e45f0b98508fc2ff74f9d0c3ecacec9 to your computer and use it in GitHub Desktop.
Check Body ScrollHeight on a loop
This file contains hidden or 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
var currentHeight = 0; | |
var checkHeight = function() { | |
if (document.body.currentHeight !== currentHeight) { | |
executeSomeFunctionHereToApplyLinks() | |
currentHeight = document.body.currentHeight | |
} | |
setTimeout(500, checkHeight) // execute this again 500ms later | |
} | |
checkHeight() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment