Skip to content

Instantly share code, notes, and snippets.

@edmeehan-tcg
Created May 3, 2018 20:37
Show Gist options
  • Save edmeehan-tcg/1d22cd1c02e6c2c857c8bba74242d926 to your computer and use it in GitHub Desktop.
Save edmeehan-tcg/1d22cd1c02e6c2c857c8bba74242d926 to your computer and use it in GitHub Desktop.
Ugly Polling Loop
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