Google CDN jQuery local version fallback

/ Published in: HTML
Save to your folder(s)

This is mostly taken from the HTML5 Boilerplate project so kudos go there.

Dont forget to update the local URL paths.

Copy this code and paste it in your HTML
  1. <!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
  2. <script src="//"></script>
  3. <script>window.jQuery || document.write("<script src='jquery/1.3.2/jquery.min.js'>\x3C/script>")</script>
  4. <script src="//"></script>
  5. <script>window.jQuery.ui || document.write("<script src='jqueryui/1.7.3/jquery-ui.min.js'>\x3C/script>")</script>


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.