Skip to content

Instantly share code, notes, and snippets.

@jessecravens
Created March 29, 2012 18:32
Show Gist options
  • Save jessecravens/2241694 to your computer and use it in GitHub Desktop.
Save jessecravens/2241694 to your computer and use it in GitHub Desktop.
JavaScript Modules - yepnope
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');
}
});
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