Split apart jQuery.css into jQuery.css (computed values) and jQuery.style (currently set values).

This commit is contained in:
jeresig 2010-09-16 10:00:56 -04:00
parent 2131e1a7ad
commit 37b607d281
6 changed files with 86 additions and 66 deletions

View file

@ -8,14 +8,14 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
// innerHeight and innerWidth
jQuery.fn["inner" + name] = function() {
return this[0] ?
parseFloat( jQuery.css( this[0], type, undefined, false, "padding" ), 10 ) :
parseFloat( jQuery.css( this[0], type, undefined, "padding" ), 10 ) :
null;
};
// outerHeight and outerWidth
jQuery.fn["outer" + name] = function( margin ) {
return this[0] ?
parseFloat( jQuery.css( this[0], type, undefined, false, margin ? "margin" : "border" ), 10 ) :
parseFloat( jQuery.css( this[0], type, undefined, margin ? "margin" : "border" ), 10 ) :
null;
};