diff options
Diffstat (limited to 'ui/jquery.ui.widget.js')
-rw-r--r-- | ui/jquery.ui.widget.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index b62b877f7..2486610ef 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -8,7 +8,17 @@ * * http://api.jqueryui.com/jQuery.widget/ */ -(function( $, undefined ) { +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ "jquery" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { var widget_uuid = 0, widget_slice = Array.prototype.slice; @@ -529,4 +539,6 @@ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { }; }); -})( jQuery ); +return $.widget; + +})); |