Posted By

lawlesscreation on 03/24/11


Tagged

javascript jquery


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

McWatt


Google CDN jQuery local version fallback


 / Published in: HTML
 

URL: http://html5boilerplate.com

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="//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
  3. <script>window.jQuery || document.write("<script src='jquery/1.3.2/jquery.min.js'>\x3C/script>")</script>
  4. <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.7.3/jquery-ui.min.js"></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.