Last active
October 10, 2015 07:18
-
-
Save danshearmur/3653869 to your computer and use it in GitHub Desktop.
Conditionally load zepto or jQuery with yepnope
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
var zep = "__proto__" in window; | |
yepnope([{ | |
test: zep, | |
yep: '/static/js/zepto.js', | |
nope: '//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js', | |
complete: function () { | |
!zep && !window.jQuery && yepnope('/static/js/jquery-1.8.1.min.js'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment