aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.effects.explode.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-06-15 12:47:12 -0400
committerScott González <scott.gonzalez@gmail.com>2012-06-15 12:47:12 -0400
commit92fb5567a25080f2064710fc24f0c6c073424cf3 (patch)
tree641a6f85bf957c07d3c804f5da711028a605bc93 /ui/jquery.effects.explode.js
parentd569b52838594c3e7e732d31dbf07dc2072edfdb (diff)
downloadjquery-ui-92fb5567a25080f2064710fc24f0c6c073424cf3.tar.gz
jquery-ui-92fb5567a25080f2064710fc24f0c6c073424cf3.zip
Effects: Renamed all files.
Diffstat (limited to 'ui/jquery.effects.explode.js')
-rw-r--r--ui/jquery.effects.explode.js96
1 files changed, 0 insertions, 96 deletions
diff --git a/ui/jquery.effects.explode.js b/ui/jquery.effects.explode.js
deleted file mode 100644
index ae3efb21e..000000000
--- a/ui/jquery.effects.explode.js
+++ /dev/null
@@ -1,96 +0,0 @@
-/*!
- * jQuery UI Effects Explode @VERSION
- *
- * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Effects/Explode
- *
- * Depends:
- * jquery.effects.core.js
- */
-(function( $, undefined ) {
-
-$.effects.effect.explode = function( o, done ) {
-
- var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
- cells = rows,
- el = $( this ),
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
-
- // show and then visibility:hidden the element before calculating offset
- offset = el.show().css( "visibility", "hidden" ).offset(),
-
- // width and height of a piece
- width = Math.ceil( el.outerWidth() / cells ),
- height = Math.ceil( el.outerHeight() / rows ),
- pieces = [],
-
- // loop
- i, j, left, top, mx, my;
-
- // children animate complete:
- function childComplete() {
- pieces.push( this );
- if ( pieces.length === rows * cells ) {
- animComplete();
- }
- }
-
- // clone the element for each row and cell.
- for( i = 0; i < rows ; i++ ) { // ===>
- top = offset.top + i * height;
- my = i - ( rows - 1 ) / 2 ;
-
- for( j = 0; j < cells ; j++ ) { // |||
- left = offset.left + j * width;
- mx = j - ( cells - 1 ) / 2 ;
-
- // Create a clone of the now hidden main element that will be absolute positioned
- // within a wrapper div off the -left and -top equal to size of our pieces
- el
- .clone()
- .appendTo( "body" )
- .wrap( "<div></div>" )
- .css({
- position: "absolute",
- visibility: "visible",
- left: -j * width,
- top: -i * height
- })
-
- // select the wrapper - make it overflow: hidden and absolute positioned based on
- // where the original was located +left and +top equal to the size of pieces
- .parent()
- .addClass( "ui-effects-explode" )
- .css({
- position: "absolute",
- overflow: "hidden",
- width: width,
- height: height,
- left: left + ( show ? mx * width : 0 ),
- top: top + ( show ? my * height : 0 ),
- opacity: show ? 0 : 1
- }).animate({
- left: left + ( show ? 0 : mx * width ),
- top: top + ( show ? 0 : my * height ),
- opacity: show ? 1 : 0
- }, o.duration || 500, o.easing, childComplete );
- }
- }
-
- function animComplete() {
- el.css({
- visibility: "visible"
- });
- $( pieces ).remove();
- if ( !show ) {
- el.hide();
- }
- done();
- }
-};
-
-})(jQuery);