Skip to content
Permalink
Browse files

Fixed #1942 but running jQuery.css() before jQuery.curCSS(). This way…

… when the property is width or height it gets the values through calculation instead of just css first. This appears to fix the problem in Opera without hurting any of the other browsers.
  • Loading branch information
davids549 committed Nov 27, 2007
1 parent b26da08 commit 2ccd2cb36be6169afee3bd6e82ba3539f432c73f
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/core.js
  2. +2 −2 src/fx.js
@@ -755,7 +755,7 @@ jQuery.extend({
elem.style[ name ] = elem.style[ "old" + name ];
},

css: function( elem, name ) {
css: function( elem, name, force ) {
if ( name == "height" || name == "width" ) {
var old = {}, height, width;

@@ -805,7 +805,7 @@ jQuery.extend({
width;
}

return jQuery.curCSS( elem, name );
return jQuery.curCSS( elem, name, force );
},

curCSS: function( elem, name, force ) {
@@ -254,8 +254,8 @@ jQuery.fx.prototype = {
if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null )
return this.elem[ this.prop ];

var r = parseFloat(jQuery.curCSS(this.elem, this.prop, force));
return r && r > -10000 ? r : parseFloat(jQuery.css(this.elem, this.prop)) || 0;
var r = parseFloat(jQuery.css(this.elem, this.prop, force));
return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
},

// Start an animation from one number to another

0 comments on commit 2ccd2cb

Please sign in to comment.
You can’t perform that action at this time.