diff options
Diffstat (limited to 'ui/jquery.ui.draggable.js')
-rw-r--r-- | ui/jquery.ui.draggable.js | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 2de1d0162..7393de28c 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -13,7 +13,22 @@ * jquery.ui.mouse.js * jquery.ui.widget.js */ -(function( $, undefined ) { +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ + "jquery", + "./jquery.ui.core", + "./jquery.ui.mouse", + "./jquery.ui.widget" + ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { $.widget("ui.draggable", $.ui.mouse, { version: "@VERSION", @@ -1004,4 +1019,6 @@ $.ui.plugin.add("draggable", "zIndex", { } }); -})(jQuery); +return $.ui.draggable; + +})); |