Created
October 27, 2018 03:06
-
-
Save thousandlemons/a7436693d7f9ceb393279f6d843533cf to your computer and use it in GitHub Desktop.
load 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
// Anonymous "self-invoking" function | |
(function() { | |
// Load the script | |
var script = document.createElement("SCRIPT"); | |
script.src = 'https://code.jquery.com/jquery-3.3.1.min.js'; | |
script.type = 'text/javascript'; | |
script.onload = function() { | |
var $ = window.jQuery; | |
// Use $ here... | |
}; | |
console.log(script); | |
document.getElementsByTagName("head")[0].appendChild(script); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment