aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.effect-explode.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.effect-explode.js')
-rw-r--r--ui/jquery.ui.effect-explode.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/ui/jquery.ui.effect-explode.js b/ui/jquery.ui.effect-explode.js
index e81ad9be0..6cfc47115 100644
--- a/ui/jquery.ui.effect-explode.js
+++ b/ui/jquery.ui.effect-explode.js
@@ -11,9 +11,22 @@
* Depends:
* jquery.ui.effect.js
*/
-(function( $, undefined ) {
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
-$.effects.effect.explode = function( o, done ) {
+ // AMD. Register as an anonymous module.
+ define([
+ "jquery",
+ "./jquery.ui.effect"
+ ], factory );
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+}(function( $ ) {
+
+return $.effects.effect.explode = function( o, done ) {
var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
cells = rows,
@@ -94,4 +107,4 @@ $.effects.effect.explode = function( o, done ) {
}
};
-})(jQuery);
+}));