Skip to content

Instantly share code, notes, and snippets.

@kensnyder
Created December 11, 2012 22:07
Show Gist options
  • Save kensnyder/4262733 to your computer and use it in GitHub Desktop.
Save kensnyder/4262733 to your computer and use it in GitHub Desktop.
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