Skip to content

Instantly share code, notes, and snippets.

@SlexAxton
Created November 22, 2010 23:54
Show Gist options
  • Save SlexAxton/710968 to your computer and use it in GitHub Desktop.
Save SlexAxton/710968 to your computer and use it in GitHub Desktop.
hurdur
// Call yepnope
yepnope([
{
load: 'http://cdn.com/jquery.js',
wait: true, // unnecessary, but clear...
callback: function(name, i, yepnope, result) {
// you have to return the execution of yepnope for this to work
return yepnope({
test: typeof window.jQuery == 'function',
nope: 'wait!local/jquery.js'
});
}
},
{
load: 'plugin.js',
callback: function() {
jQuery(function($){
$('#id').plugin();
});
}
}
]);
// note:: some types of failures cause callbacks to never be fired in some browsers,
// so this isn't foolproof... but better than nothing...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment