Skip to content

Commit 2319fae

Browse files
author
Artyom 'Sleepwalker' Fedosov
committed
Add UMD
1 parent 142388d commit 2319fae

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

lib/jquery-ui.tabs.neighbors.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
/*
2-
* jQueryUI.Tabs.Neighbors, v1.0.0
2+
* jQueryUI.Tabs.Neighbors, v1.0.1
33
* (c) 2014–2017 Artyom "Sleepwalker" Fedosov <[email protected]>
44
* https://github.com/asleepwalker/jquery-ui.tabs.neighbors.js
55
*/
66

7-
(function ($) {
7+
(function (factory) {
8+
if (typeof define === 'function' && define.amd) {
9+
define(['jquery'], factory);
10+
} else if (typeof module === 'object' && module.exports) {
11+
module.exports = function (root, jQuery) {
12+
if (jQuery === undefined) {
13+
if (typeof window !== 'undefined') {
14+
jQuery = require('jquery');
15+
} else {
16+
jQuery = require('jquery')(root);
17+
}
18+
}
19+
factory(jQuery);
20+
return jQuery;
21+
};
22+
} else {
23+
factory(jQuery);
24+
}
25+
}(function ($) {
826

927
var originalCreate = $.ui.tabs.prototype._create;
1028

@@ -89,4 +107,4 @@
89107
}
90108
});
91109

92-
})(jQuery);
110+
}));

0 commit comments

Comments
 (0)