public
Created

Zepto + jQuery on CDN + local support. Ready for Rails 3.1+ with asset pipeline

  • Download Gist
_zepto-jquery.html.erb
HTML+ERB
1 2 3 4 5 6 7 8 9
<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>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.