Skip to content

Commit fe420c0

Browse files
committed
Selectmenu: Add UMD wrapper
1 parent df6110c commit fe420c0

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

ui/selectmenu.js

+18-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,24 @@
77
* http://jquery.org/license
88
*
99
* http://api.jqueryui.com/selectmenu
10-
*
11-
* Depends:
12-
* jquery.ui.core.js
13-
* jquery.ui.widget.js
14-
* jquery.ui.position.js
15-
* jquery.ui.menu.js
1610
*/
17-
(function( $, undefined ) {
11+
(function( factory ) {
12+
if ( typeof define === "function" && define.amd ) {
13+
14+
// AMD. Register as an anonymous module.
15+
define([
16+
"jquery",
17+
"./core",
18+
"./widget",
19+
"./position",
20+
"./menu"
21+
], factory );
22+
} else {
23+
24+
// Browser globals
25+
factory( jQuery );
26+
}
27+
}(function( $ ) {
1828

1929
return $.widget( "ui.selectmenu", {
2030
version: "@VERSION",
@@ -533,4 +543,4 @@ return $.widget( "ui.selectmenu", {
533543
}
534544
});
535545

536-
}( jQuery ));
546+
}));

0 commit comments

Comments
 (0)