Created
November 25, 2014 16:31
-
-
Save AWaselnuk/735c12aca5bdd7573479 to your computer and use it in GitHub Desktop.
Wait for dependencies to arrive before executing code
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
// From: http://stackoverflow.com/questions/16425520/angularjs-test-that-an-external-script-is-effectively-loaded | |
(function waiter(){ | |
if(!window.jQuery){ return setTimeout(waiter, 37); } | |
$("#myDiv").fadeOut(); | |
}()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment