jQuery: The Write Less, Do More JavaScript Library

Changeset 3958

Show
Ignore:
Timestamp:
11/27/07 23:58:07 (8 months ago)
Author:
davidserduke
Message:

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.

Location:
trunk/jquery/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/jquery/src/core.js

    r3944 r3958  
    756756    }, 
    757757 
    758     css: function( elem, name ) { 
     758    css: function( elem, name, force ) { 
    759759        if ( name == "height" || name == "width" ) { 
    760760            var old = {}, height, width; 
     
    806806        } 
    807807 
    808         return jQuery.curCSS( elem, name ); 
     808        return jQuery.curCSS( elem, name, force ); 
    809809    }, 
    810810 
  • trunk/jquery/src/fx.js

    r3837 r3958  
    255255            return this.elem[ this.prop ]; 
    256256 
    257         var r = parseFloat(jQuery.curCSS(this.elem, this.prop, force)); 
    258         return r && r > -10000 ? r : parseFloat(jQuery.css(this.elem, this.prop)) || 0; 
     257        var r = parseFloat(jQuery.css(this.elem, this.prop, force)); 
     258        return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0; 
    259259    }, 
    260260