Created
August 11, 2012 17:43
-
-
Save ZenCocoon/3325940 to your computer and use it in GitHub Desktop.
Zepto + jQuery on CDN + local support. Ready for Rails 3.1+ with asset pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
document.write('<script src=//' + ('__proto__' in {} ? 'cdnjs.cloudflare.com/ajax/libs/zepto/1.0rc1/zepto' : 'ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery') + '.min.js><\/script>') | |
</script> | |
<script> | |
if ('__proto__' in {}) | |
window.Zepto || document.write('<script src="assets/libs/zepto.min.js"><\/script>') | |
else | |
window.jQuery || document.write('<script src="assets/libs/jquery.min.js"><\/script>') | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment