Last active
September 7, 2016 11:39
-
-
Save Gergling/6904418 to your computer and use it in GitHub Desktop.
Script for copying into a console to include jquery and requirejs.
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
// Usage: | |
//document.write('<scr'+'ipt src="https://requirejs.org/docs/release/2.1.8/comments/require.js"></scr'+'ipt>'); | |
var script = document.createElement('script');script.src = "https://requirejs.org/docs/release/2.1.8/comments/require.js"; | |
document.head.appendChild(script); | |
var oldDollar = $;requirejs(["https://code.jquery.com/jquery-1.10.2.js"], function() { | |
var jQuery = $; | |
var $ = oldDollar; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment