- // Hide the element if the "hide" operation was done
- if ( z.o.hide ) y.display = 'none';
-
- // Reset the overflow
- y.overflow = z.el.oldOverflow;
-
- // Reset the property, if the item has been hidden
- if ( z.o.hide )
- y[ prop ] = z.el.orig[ prop ].constructor == Number && prop != "opacity" ?
- z.el.orig[prop] + "px" : z.el.orig[prop];
-
- // set its height and/or width to auto
- jQuery.setAuto( z.el, prop );
+ z.el.curAnim[ prop ] = true;
+
+ var done = true;
+ for ( var i in z.el.curAnim )
+ if ( z.el.curAnim[i] !== true )
+ done = false;
+
+ if ( done ) {
+ // Reset the overflow
+ y.overflow = z.el.oldOverflow;
+
+ // Hide the element if the "hide" operation was done
+ if ( z.o.hide )
+ y.display = 'none';
+
+ // Reset the property, if the item has been hidden
+ if ( z.o.hide ) {
+ for ( var p in z.el.curAnim ) {
+ y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" );
+
+ // set its height and/or width to auto
+ if ( p == 'height' || p == 'width' )
+ jQuery.setAuto( z.el, p );
+ }
+ }
+ }