aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.effect-shake.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.effect-shake.js')
-rw-r--r--ui/jquery.ui.effect-shake.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/ui/jquery.ui.effect-shake.js b/ui/jquery.ui.effect-shake.js
index 1e7e827e7..ef03a103f 100644
--- a/ui/jquery.ui.effect-shake.js
+++ b/ui/jquery.ui.effect-shake.js
@@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
-(function( $, undefined ) {
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
-$.effects.effect.shake = function( o, done ) {
+ // AMD. Register as an anonymous module.
+ define([
+ "jquery",
+ "./jquery.ui.effect"
+ ], factory );
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+return $.effects.effect.shake = function( o, done ) {
var el = $( this ),
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
@@ -71,4 +84,4 @@ $.effects.effect.shake = function( o, done ) {
};
-})(jQuery);
+}));