From 96e027e4b14345722cc39589f59ce2ce5e94b991 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Fri, 12 Jul 2013 13:40:48 -0300 Subject: All: Wrap source files with UMD return exports Ref #9464 Ref gh-1029 --- ui/jquery.ui.effect-slide.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'ui/jquery.ui.effect-slide.js') diff --git a/ui/jquery.ui.effect-slide.js b/ui/jquery.ui.effect-slide.js index 3fa63433e..4f4fd4f69 100644 --- a/ui/jquery.ui.effect-slide.js +++ b/ui/jquery.ui.effect-slide.js @@ -11,9 +11,22 @@ * Depends: * jquery.ui.effect.js */ -(function( $, undefined ) { +(function( factory ) { + if ( typeof define === "function" && define.amd ) { -$.effects.effect.slide = function( o, done ) { + // AMD. Register as an anonymous module. + define([ + "jquery", + "./jquery.ui.effect" + ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { + +return $.effects.effect.slide = function( o, done ) { // Create element var el = $( this ), @@ -61,4 +74,4 @@ $.effects.effect.slide = function( o, done ) { }); }; -})(jQuery); +})); -- cgit v1.2.3