diff options
author | Rafael Xavier de Souza <rxaviers@gmail.com> | 2013-07-12 13:40:48 -0300 |
---|---|---|
committer | Rafael Xavier de Souza <rxaviers@gmail.com> | 2014-01-24 18:22:14 -0200 |
commit | 96e027e4b14345722cc39589f59ce2ce5e94b991 (patch) | |
tree | ca32a2fff151af28597c158198550eca6e5b8f18 /ui/jquery.ui.effect-fade.js | |
parent | 2651f4571e76979d93cf10d50edc452b0311a5f2 (diff) | |
download | jquery-ui-96e027e4b14345722cc39589f59ce2ce5e94b991.tar.gz jquery-ui-96e027e4b14345722cc39589f59ce2ce5e94b991.zip |
All: Wrap source files with UMD return exports
Ref #9464
Ref gh-1029
Diffstat (limited to 'ui/jquery.ui.effect-fade.js')
-rw-r--r-- | ui/jquery.ui.effect-fade.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/ui/jquery.ui.effect-fade.js b/ui/jquery.ui.effect-fade.js index b44140025..543a5210d 100644 --- a/ui/jquery.ui.effect-fade.js +++ b/ui/jquery.ui.effect-fade.js @@ -11,9 +11,22 @@ * Depends: * jquery.ui.effect.js */ -(function( $, undefined ) { +(function( factory ) { + if ( typeof define === "function" && define.amd ) { -$.effects.effect.fade = function( o, done ) { + // AMD. Register as an anonymous module. + define([ + "jquery", + "./jquery.ui.effect" + ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { + +return $.effects.effect.fade = function( o, done ) { var el = $( this ), mode = $.effects.setMode( el, o.mode || "toggle" ); @@ -27,4 +40,4 @@ $.effects.effect.fade = function( o, done ) { }); }; -})( jQuery ); +})); |