Created
February 28, 2013 16:46
-
-
Save jbosse/5058099 to your computer and use it in GitHub Desktop.
dynamic load js
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
<script> | |
(function (undefined) { | |
try { | |
if (jQuery !== undefined) { | |
return; | |
} | |
} catch (e) { | |
var body = document.getElementsByTagName('body')[0]; | |
var jqueryScript = document.createElement("script"); | |
console.log(jqueryScript); | |
jqueryScript.src = '/Scripts/jquery-1.7.2.js'; | |
body.appendChild(jqueryScript); | |
console.log(body); | |
} | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment