Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AMD Compatibility - Does this work?
function defineMyPlugin($) {
/*...*/
}
if (typeof define == 'function') {
define('MyPlugin', ['jquery'], defineMyPlugin);
}
else {
defineMyPlugin(jQuery);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment