jQuery: The Write Less, Do More JavaScript Library

Ticket #1942: 1942.diff

File 1942.diff, 1.2 kB (added by davidserduke, 9 months ago)

proposed patch

  • src/core.js

     
    749749            elem.style[ name ] = elem.style[ "old" + name ]; 
    750750    }, 
    751751 
    752     css: function( elem, name ) { 
     752    css: function( elem, name, force ) { 
    753753        if ( name == "height" || name == "width" ) { 
    754754            var old = {}, height, width; 
    755755 
     
    799799                width; 
    800800        } 
    801801 
    802         return jQuery.curCSS( elem, name ); 
     802        return jQuery.curCSS( elem, name, force ); 
    803803    }, 
    804804 
    805805    curCSS: function( elem, name, force ) { 
  • src/fx.js

     
    254254        if ( this.elem[this.prop] != null && this.elem.style[this.prop] == null ) 
    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 
    261261    // Start an animation from one number to another