aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.effect-puff.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.effect-puff.js')
-rw-r--r--ui/jquery.ui.effect-puff.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/ui/jquery.ui.effect-puff.js b/ui/jquery.ui.effect-puff.js
index a910defb2..4940ca390 100644
--- a/ui/jquery.ui.effect-puff.js
+++ b/ui/jquery.ui.effect-puff.js
@@ -12,9 +12,23 @@
* jquery.ui.effect.js
* jquery.ui.effect-scale.js
*/
-(function( $, undefined ) {
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
-$.effects.effect.puff = function( o, done ) {
+ // AMD. Register as an anonymous module.
+ define([
+ "jquery",
+ "./jquery.ui.effect",
+ "./jquery.ui.effect-scale"
+ ], factory );
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+return $.effects.effect.puff = function( o, done ) {
var elem = $( this ),
mode = $.effects.setMode( elem, o.mode || "hide" ),
hide = mode === "hide",
@@ -47,4 +61,4 @@ $.effects.effect.puff = function( o, done ) {
elem.effect( o );
};
-})(jQuery);
+}));