X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Ffx%2Ffx.js;h=64449865bfdaae25088180d726acb6e6a41f5eee;hb=692d676e993b198e30c8940ab61745d7578229bf;hp=fe1c1e2ba530c9a3d5b7642b3e6664bc760aa0db;hpb=dbee06de85859af59591813d3004e6695b8bb278;p=jquery.git diff --git a/src/fx/fx.js b/src/fx/fx.js index fe1c1e2..6444986 100644 --- a/src/fx/fx.js +++ b/src/fx/fx.js @@ -315,7 +315,7 @@ jQuery.fn.extend({ animate: function(prop,speed,callback) { return this.queue(function(){ - this.curAnim = prop; + this.curAnim = jQuery.extend({}, prop); for ( var p in prop ) { var e = new jQuery.fx( this, jQuery.speed(speed,callback), p ); @@ -479,17 +479,16 @@ jQuery.extend({ }; // Simple 'show' function - z.show = function( p ){ + z.show = function(){ if ( !z.el.orig ) z.el.orig = {}; // Remember where we started, so that we can go back to it later z.el.orig[prop] = this.cur(); + var start = z.el.orig[prop]; + // Begin the animation - if (prop == "opacity") - z.custom(z.el.orig[prop], 1); - else - z.custom(0, z.el.orig[prop]); + z.custom(0, z.el.orig[prop]); // Stupid IE, look what you made me do if ( prop != "opacity" ) @@ -510,7 +509,7 @@ jQuery.extend({ }; // Remember the overflow of the element - if ( !z.el.oldOverlay ) + if ( !z.el.oldOverflow ) z.el.oldOverflow = jQuery.css( z.el, "overflow" ); // Make sure that nothing sneaks out @@ -546,7 +545,7 @@ jQuery.extend({ // Reset the property, if the item has been hidden if ( z.o.hide ) { for ( var p in z.el.curAnim ) { - if (p == "opacity" && jQuery.browser.msie) + if (p == "opacity") jQuery.attr(y, p, z.el.orig[p]); else y[ p ] = z.el.orig[p] + "px";