Codesnipp.it Social Code Sharing

Ash Connell

Use jQuery from Google CDN with local fallback

by Ash Connell on Jan 29, 2012

<!-- Fetch jQuery from Google, otherwise use local version (if google is down) --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="js/libs/jquery-1.6.2.min.js"><\/script>')</script>

Can't see the comments? Please login first :)