AMD support

This commit is contained in:
Pavel Reznikov 2015-01-19 20:20:58 -08:00
commit 3f992b98be
4 changed files with 15 additions and 4 deletions

View file

@ -3,7 +3,16 @@
// (c) 2014-2015 Pavel Reznikov
// gridstack.js may be freely distributed under the MIT license.
(function (scope, _) {
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery', 'underscore'], factory);
}
else {
factory(jQuery, _);
}
})(function ($, _) {
var scope = window;
var Utils = {
is_intercepted: function (a, b) {
@ -717,4 +726,5 @@
});
};
})(window, _);
return scope.GridStackUI;
});