Return to Snippet

Revision: 46786
at May 25, 2011 02:25 by jeremytarpley


Initial Code
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
<script type="text/javascript">!window.jQuery && document.write('<script src="http://www.thiswebsitesdomain/js/jquery.js"><\/script>')</script>

Initial URL


Initial Description
if the Google cdn copy of jquery or what ever fails, use a local copy of the script

Initial Title
Smart way to add jquery or other js from Google's cdn - fail over to local copy

Initial Tags


Initial Language
JavaScript