Skip to content

Instantly share code, notes, and snippets.

@Fogh
Created August 15, 2011 16:56
Show Gist options
  • Save Fogh/1147189 to your computer and use it in GitHub Desktop.
Save Fogh/1147189 to your computer and use it in GitHub Desktop.
Get jQuery from Google API, and if unavailable get local version instead.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
@Fogh
Copy link
Author

Fogh commented Aug 15, 2011

Remember to edit the URL for local jQuery file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment