X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Feffects.js;h=7d2cd8f93ee6650b4a0240733168b2c41a203abc;hb=497fc9849e91ba8602adf7908b4febf2d36bc1c8;hp=241dbd03687afe9bd419b910b0e90bbf487fba2e;hpb=543db64412b37b5fa1f3d7fea19f62d6db993fb0;p=jquery.git diff --git a/src/effects.js b/src/effects.js index 241dbd0..7d2cd8f 100644 --- a/src/effects.js +++ b/src/effects.js @@ -49,9 +49,10 @@ jQuery.fn.extend({ } else { for ( var i = 0, j = this.length; i < j; i++ ) { - var old = jQuery.data(this[i], "olddisplay"); - if ( !old ) { - jQuery.data( this[i], "olddisplay", jQuery.css( this[i], "display" ) ); + var display = jQuery.css( this[i], "display" ); + + if ( display !== "none" ) { + jQuery.data( this[i], "olddisplay", display ); } } @@ -181,9 +182,9 @@ jQuery.fn.extend({ // We need to compute starting value if ( unit !== "px" ) { - self.style[ name ] = (end || 1) + unit; + jQuery.style( self, name, (end || 1) + unit); start = ((end || 1) / e.cur(true)) * start; - self.style[ name ] = start + unit; + jQuery.style( self, name, start + unit); } // If a +=/-= token was provided, we're doing a relative animation