diff options
author | TJ VanToll <tj.vantoll@gmail.com> | 2014-02-21 14:56:13 -0500 |
---|---|---|
committer | TJ VanToll <tj.vantoll@gmail.com> | 2014-02-21 14:56:13 -0500 |
commit | fe420c0eaccb490e2f66423c60a896b88da79395 (patch) | |
tree | 204c72c10b827499d7503517e40f4246c056403b /ui/selectmenu.js | |
parent | df6110c0d424ff3306fdd5576011f2dcf4d242d0 (diff) | |
download | jquery-ui-fe420c0eaccb490e2f66423c60a896b88da79395.tar.gz jquery-ui-fe420c0eaccb490e2f66423c60a896b88da79395.zip |
Selectmenu: Add UMD wrapper
Diffstat (limited to 'ui/selectmenu.js')
-rw-r--r-- | ui/selectmenu.js | 26 |
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 )); +})); |