Created
February 20, 2014 16:47
-
-
Save bmadigan/9118138 to your computer and use it in GitHub Desktop.
JQuery from CDN or Local copy if not define
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
// First try loading jQuery from Google's CDN | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
// Fall back to a local copy of jQuery if the CDN fails | |
<script> | |
window.jQuery || document.write('<script src="http://mysite.com/jquery.min.js"><\/script>')) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment