Skip to content

Commit

Permalink
add an amd factory to the jquery plugin (see https://github.com/umdjs…
Browse files Browse the repository at this point in the history
  • Loading branch information
akre54 committed Jan 23, 2013
1 parent c8e809c commit 6972e0e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions client/js/jquery-plugin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
/*globals jQuery, qq*/
(function($) {
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else {
// Browser globals
factory(jQuery);
}
}(function($) {
"use strict";
var uploader, $el, init, dataStore, pluginOption, pluginOptions, addCallbacks, transformVariables, isValidCommand,
delegateCommand;
Expand Down Expand Up @@ -165,4 +173,4 @@
return this;
};

}(jQuery));
}));

0 comments on commit 6972e0e

Please sign in to comment.