Created
May 5, 2015 13:25
-
-
Save AllThingsSmitty/889acd01889c84ff162c to your computer and use it in GitHub Desktop.
Check if any given script has loaded
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 myScript = document.createElement('script'); | |
myScript.src = 'http://code.jquery.com/jquery-2.1.4.min.js'; | |
myScript.onload = function() { | |
console.log('jQuery loaded.'); | |
}; | |
document.body.appendChild(myScript); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wish I could found a down-vote button