X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Ffx.js;h=35a9485ae4423d5eb4c53aabaa90483158d3c401;hb=201f1b66cc4fe86ea08d118ce15d831c6561cc8c;hp=ab3fe1a2ac2eea652deed59335ff40c8cedd5a28;hpb=faa502cbc0336eacf0f6c1bbc872d168a9f513e9;p=jquery.git diff --git a/src/fx.js b/src/fx.js index ab3fe1a..35a9485 100644 --- a/src/fx.js +++ b/src/fx.js @@ -82,7 +82,7 @@ jQuery.fn.extend({ if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden ) return opt.complete.call(this); - if ( p == "height" || p == "width" ) { + if ( ( p == "height" || p == "width" ) && this.style ) { // Store display property opt.display = jQuery.css(this, "display"); @@ -264,7 +264,7 @@ jQuery.fx.prototype = { (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this ); // Set display property to block for height/width animations - if ( this.prop == "height" || this.prop == "width" ) + if ( ( this.prop == "height" || this.prop == "width" ) && this.elem.style ) this.elem.style.display = "block"; }, @@ -407,20 +407,16 @@ jQuery.extend( jQuery.fx, { _default: 400 }, step: { - scrollLeft: function(fx){ - fx.elem.scrollLeft = fx.now; - }, - - scrollTop: function(fx){ - fx.elem.scrollTop = fx.now; - }, opacity: function(fx){ jQuery.attr(fx.elem.style, "opacity", fx.now); }, _default: function(fx){ - ( fx.elem.style && ( fx.elem.style[ fx.prop ] = fx.now + fx.unit ) ) || ( fx.elem[ fx.prop ] = fx.now ); + if( fx.prop in fx.elem ) + fx.elem[ fx.prop ] = fx.now; + else if( fx.elem.style ) + fx.elem.style[ fx.prop ] = fx.now + fx.unit; } } });