Created
June 27, 2013 17:02
-
-
Save marshall007/5878229 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var inject_script = function(source) { | |
| if (!source) source = "//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.js"; | |
| var script = document.createElement("script"); | |
| script.src = source; | |
| script.type="text/javascript"; | |
| document.getElementsByTagName("head")[0].appendChild(script); | |
| var listen = setInterval(function() { | |
| if(typeof jQuery !== 'undefined') { | |
| $ = jQuery; | |
| clearInterval(listen); | |
| } | |
| },50); | |
| }; | |
| inject_script(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment