Merge branch 'animateHooks' of http://github.com/lrbabe/jquery into lrbabe-animateHooks
authorJohn Resig <jeresig@gmail.com>
Mon, 11 Oct 2010 20:44:12 +0000 (16:44 -0400)
committerJohn Resig <jeresig@gmail.com>
Mon, 11 Oct 2010 20:44:12 +0000 (16:44 -0400)
1  2 
src/effects.js

diff --combined src/effects.js
@@@ -49,10 -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 );
                                }
                        }
  
  
                                                // 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