Skip to content

Instantly share code, notes, and snippets.

@theiwaz
theiwaz / jquery-with-fallback.html
Created May 1, 2013 08:51 — forked from markvital/jquery-with-fallback.html
HTML: JQuery CDN with fallback
<!-- Grab Google CDN's jQuery & jQuery UI. Fall back to local if necessary -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
window.jQuery || document.write(unescape("<script src='/js/jquery-1.8.2.min.js' type='text/javascript'</script>"));
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.1/jquery-ui.min.js"></script>
<script type="text/javascript">
window.jQuery.ui || document.write(unescape("<script src='/js/jquery-ui.min.js' type='text/javascript'</script>"));
</script>