Ticket #4214: jquery.diff
File jquery.diff, 1.7 KB (added by , 13 years ago) |
---|
-
jquery.
old new 6 6 * Dual licensed under the MIT and GPL licenses. 7 7 * http://docs.jquery.com/License 8 8 * 9 * Date: 2009-02-19 1 6:34:21 -0600 (Thu, 19 Feb 2009)9 * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) 10 10 * Revision: 6246 11 11 */ 12 12 (function(){ … … 192 192 }, 193 193 194 194 css: function( key, value ) { 195 if (key == 'transform') { 196 if (typeof jQuery.props[key] == 'undefined' || !jQuery.props[key]) { 197 jQuery.props[key] = getTransformProperty(this.get(0)); 198 } 199 } 200 195 201 // ignore negative width and height values 196 202 if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) 197 203 value = undefined; … … 794 800 if ( name.match( /float/i ) ) 795 801 name = styleFloat; 796 802 803 // Will map transform to browser specific transform properties 804 name = jQuery.props[ name ] || name; 805 797 806 if ( !force && style && style[ name ] ) 798 807 ret = style[ name ]; 799 808 … … 3209 3218 3210 3219 var styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat"; 3211 3220 3221 function getTransformProperty(element) { 3222 // Try transform first for forward compatibility 3223 var properties = ['transform', 'WebkitTransform', 'MozTransform']; 3224 var p; 3225 while (p = properties.shift()) { 3226 if (typeof element.style[p] != 'undefined') { 3227 return p; 3228 } 3229 } 3230 // Default to transform also 3231 return 'transform'; 3232 } 3233 3212 3234 jQuery.props = { 3213 3235 "for": "htmlFor", 3214 3236 "class": "className", … … 3219 3241 maxlength: "maxLength", 3220 3242 cellspacing: "cellSpacing", 3221 3243 rowspan: "rowSpan", 3222 tabindex: "tabIndex" 3244 tabindex: "tabIndex", 3245 transform: undefined 3223 3246 }; 3224 3247 jQuery.fn.extend({ 3225 3248 // Keep a copy of the old load