Created
February 15, 2013 14:43
-
-
Save renaudleo/4960783 to your computer and use it in GitHub Desktop.
Check if jQuery is 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
if (typeof jQuery == 'undefined') { | |
var script = document.createElement('script'); | |
script.src = "http://path.to.jquery.js"; | |
document.getElementsByTagName('head')[0].appendChild(script); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment