aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.effect-transfer.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.effect-transfer.js')
-rw-r--r--ui/jquery.ui.effect-transfer.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/ui/jquery.ui.effect-transfer.js b/ui/jquery.ui.effect-transfer.js
index 31fbfa219..da7351f6d 100644
--- a/ui/jquery.ui.effect-transfer.js
+++ b/ui/jquery.ui.effect-transfer.js
@@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
-(function( $, undefined ) {
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
-$.effects.effect.transfer = function( o, done ) {
+ // AMD. Register as an anonymous module.
+ define([
+ "jquery",
+ "./jquery.ui.effect"
+ ], factory );
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+return $.effects.effect.transfer = function( o, done ) {
var elem = $( this ),
target = $( o.to ),
targetFixed = target.css( "position" ) === "fixed",
@@ -44,4 +57,4 @@ $.effects.effect.transfer = function( o, done ) {
});
};
-})(jQuery);
+}));