Skip to content

Instantly share code, notes, and snippets.

@snichme
Created April 25, 2013 16:04
Show Gist options
  • Save snichme/5460912 to your computer and use it in GitHub Desktop.
Save snichme/5460912 to your computer and use it in GitHub Desktop.
Making jQuery plugins AMD compatible
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else {
factory(jQuery);
}
}(function ($) {
$.fn.jqueryPlugin = function () {};
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment