Created
December 7, 2015 11:45
-
-
Save arzzen/18097cef9317fe69fc55 to your computer and use it in GitHub Desktop.
fall back to local jquery in case cdn is unavailable
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 type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> | |
<script type="text/javascript"> | |
if (typeof jQuery === 'undefined') | |
{ | |
// fall back to local jQuery in case CDN is unavailable | |
document.write('\x3Cscript type="text/javascript" src="/js/jquery.min.js">\x3C/script>'); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment