Posted By

lawlesscreation on 03/24/11


javascript jquery

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Google CDN jQuery local version fallback

 / Published in: HTML


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

Dont forget to update the local URL paths.

  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  

You need to login to post a comment.