Skip to content

Instantly share code, notes, and snippets.

@brentertz
Created June 24, 2011 15:40
Show Gist options
  • Save brentertz/1045048 to your computer and use it in GitHub Desktop.
Save brentertz/1045048 to your computer and use it in GitHub Desktop.
Google CDN jquery with local fallback
-# Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if needed
%script{:src => "//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"}
:javascript
!window.jQuery && document.write('<script src="/javascripts/jquery.min.js"><\/script>')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment