Created
May 3, 2018 20:37
-
-
Save edmeehan-tcg/1d22cd1c02e6c2c857c8bba74242d926 to your computer and use it in GitHub Desktop.
Ugly Polling Loop
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
var myVar = setInterval(function(){ | |
if(document.getElementById("test").classList.contains(className)) { | |
clearInterval(myVar); | |
// do stuff here. | |
} | |
}, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment