X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Ffx.js;h=a4f4ef875b0de8243b59bb39180a09485d212628;hb=1ac9d6fbeed214d59ea5c31a87ff2c19bb08dbc8;hp=d75f3d0b0c6d15449b2d4e2870da5e609b542340;hpb=dbca9cbf629e282b511c32c8c870da37ef9fa92b;p=jquery.git diff --git a/src/fx.js b/src/fx.js index d75f3d0..a4f4ef8 100644 --- a/src/fx.js +++ b/src/fx.js @@ -66,10 +66,10 @@ jQuery.fn.extend({ }, animate: function( prop, speed, easing, callback ) { - var opt = jQuery.speed(speed, easing, callback); + var optall = jQuery.speed(speed, easing, callback); - return this[ opt.queue === false ? "each" : "queue" ](function(){ - opt = jQuery.extend({}, opt); + return this[ optall.queue === false ? "each" : "queue" ](function(){ + var opt = jQuery.extend({}, optall); var hidden = jQuery(this).is(":hidden"), self = this; for ( var p in prop ) { @@ -105,8 +105,8 @@ jQuery.fn.extend({ // We need to compute starting value if ( unit != "px" ) { - self.style[ name ] = end + unit; - start = (end / e.cur(true)) * start; + self.style[ name ] = (end || 1) + unit; + start = ((end || 1) / e.cur(true)) * start; self.style[ name ] = start + unit; }