aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTJ VanToll <tj.vantoll@gmail.com>2014-02-21 14:56:13 -0500
committerTJ VanToll <tj.vantoll@gmail.com>2014-02-21 14:56:13 -0500
commitfe420c0eaccb490e2f66423c60a896b88da79395 (patch)
tree204c72c10b827499d7503517e40f4246c056403b
parentdf6110c0d424ff3306fdd5576011f2dcf4d242d0 (diff)
downloadjquery-ui-fe420c0eaccb490e2f66423c60a896b88da79395.tar.gz
jquery-ui-fe420c0eaccb490e2f66423c60a896b88da79395.zip
Selectmenu: Add UMD wrapper
-rw-r--r--ui/selectmenu.js26
1 files changed, 18 insertions, 8 deletions
diff --git a/ui/selectmenu.js b/ui/selectmenu.js
index 66398a6e3..2a89d9dd0 100644
--- a/ui/selectmenu.js
+++ b/ui/selectmenu.js
@@ -7,14 +7,24 @@
* http://jquery.org/license
*
* http://api.jqueryui.com/selectmenu
- *
- * Depends:
- * jquery.ui.core.js
- * jquery.ui.widget.js
- * jquery.ui.position.js
- * jquery.ui.menu.js
*/
-(function( $, undefined ) {
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+
+ // AMD. Register as an anonymous module.
+ define([
+ "jquery",
+ "./core",
+ "./widget",
+ "./position",
+ "./menu"
+ ], factory );
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+}(function( $ ) {
return $.widget( "ui.selectmenu", {
version: "@VERSION",
@@ -533,4 +543,4 @@ return $.widget( "ui.selectmenu", {
}
});
-}( jQuery ));
+}));