Last active
April 10, 2018 02:23
-
-
Save mort3za/845f06cf3d3724d36e16 to your computer and use it in GitHub Desktop.
Loading jQuery and AngularJS from CDN with local fallback
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='http://code.jquery.com/jquery-latest.min.js' type='text/javascript'></script> | |
<script src='//ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js' type='text/javascript'></script> | |
<script type="text/javascript"> | |
// Fallbacks | |
window.jQuery || document.write(unescape("%3Cscript src='js/vendor/jquery.min.js' type='text/javascript'%3E%3C/script%3E")); | |
window.angular || document.write(unescape("%3Cscript src='js/vendor/angular.min.js' type='text/javascript'%3E%3C/script%3E")); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment