Last active
August 26, 2015 15:17
-
-
Save masterT/47cbe016048957dc1c47 to your computer and use it in GitHub Desktop.
Add jQuery
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
if (typeof jQuery == "undefined") { | |
console.log("Loading jQuery!"); | |
var script = document.createElement('script'); | |
script.type = 'text/javascript'; | |
script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"; | |
document.body.appendChild(script); | |
} else { | |
console.log("Let's rock!"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment