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

@ -458,6 +458,7 @@ Changes
#### v0.2.3 (development version)
- AMD support
- fix nodes sorting
- improved touch devices support
- add `always_show_resize_handle` option

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

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;
});