Jquery from cdn

cdnjquery

How do i load the following in cdn and if they fail i would wnat my local file to load if this fails

  1. Google's CDN : jquery.min.js and jquery-ui.min.js.
  2. Microsoft's CDN : jQuery.Validate.min.js

Best Answer

this is how guys from html5boilerplate.com do this

<!-- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if necessary -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.5.1.min.js">\x3C/script>')</script>