Last active
August 29, 2015 14:24
-
-
Save dieseltravis/4102 to your computer and use it in GitHub Desktop.
Non-blocking JavaScript Downloads, with 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
<script src="scripts/jquery.js" type="text/javascript"></script> | |
<script type="text/javascript">//<![CDATA[ | |
var js = ["scripts/jquery.dimensions.js", "scripts/shadedborder.js", "scripts/jqmodal.js", "scripts/main.js"]; | |
var $head = $("head"); | |
for (var i = 0; i < js.length; i++) { | |
$head.append("<script src=\"" + js[i] + "\" type=\"text/javascript\"></scr" + "ipt>"); | |
} | |
//]]></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment