Skip to content

Instantly share code, notes, and snippets.

@tonycaputome
Created July 12, 2013 09:09
Show Gist options
  • Save tonycaputome/5983012 to your computer and use it in GitHub Desktop.
Save tonycaputome/5983012 to your computer and use it in GitHub Desktop.
<!-- Load either Zepto or jQuery, as necessary, from a CDN with a local fallback -->
<script>
document.write('<script src="//cdnjs.cloudflare.com/ajax/libs/' +
('__proto__' in {} ?
'zepto/1.0/zepto.min' :
'jquery/1.10.2/jquery.min')
+ '.js"><\/script>')
</script>
<script>
window.$ || document.write('<script src="js/vendor/' +
('__proto__' in {} ? 'zepto.min' : 'jquery-1.10.2.min')
+ '.js"><\/script>')
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment