Created
November 22, 2010 23:54
-
-
Save SlexAxton/710968 to your computer and use it in GitHub Desktop.
hurdur
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
// 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