Created
March 29, 2012 18:32
-
-
Save jessecravens/2241694 to your computer and use it in GitHub Desktop.
JavaScript Modules - 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
someLoader('http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js', function () { | |
if (!window.jQuery) { | |
someLoader('local/jquery.min.js', 'jquery.plugin.js'); | |
} else { | |
someLoader('jquery.plugin.js'); | |
} | |
}); |
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
yepnope({ | |
test: Modernizr.geolocation, | |
yep: 'regular-styles.css', | |
nope: ['modified-styles.css', 'geolocation-polyfill.js'], | |
callback: function (url, result, key) { | |
alert(url); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment