diff options
Diffstat (limited to 'ui/jquery.ui.effect-highlight.js')
-rw-r--r-- | ui/jquery.ui.effect-highlight.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/ui/jquery.ui.effect-highlight.js b/ui/jquery.ui.effect-highlight.js index 2dc72082e..9c0f2d315 100644 --- a/ui/jquery.ui.effect-highlight.js +++ b/ui/jquery.ui.effect-highlight.js @@ -11,9 +11,22 @@ * Depends: * jquery.ui.effect.js */ -(function( $, undefined ) { +(function( factory ) { + if ( typeof define === "function" && define.amd ) { -$.effects.effect.highlight = function( o, done ) { + // AMD. Register as an anonymous module. + define([ + "jquery", + "./jquery.ui.effect" + ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { + +return $.effects.effect.highlight = function( o, done ) { var elem = $( this ), props = [ "backgroundImage", "backgroundColor", "opacity" ], mode = $.effects.setMode( elem, o.mode || "show" ), @@ -47,4 +60,4 @@ $.effects.effect.highlight = function( o, done ) { }); }; -})(jQuery); +})); |