aboutsummaryrefslogtreecommitdiffstats
path: root/src/dimensions.js
diff options
context:
space:
mode:
authorAriel Flesler <aflesler@gmail.com>2009-03-06 04:23:44 +0000
committerAriel Flesler <aflesler@gmail.com>2009-03-06 04:23:44 +0000
commit2d4755a0fb1e34cc81d142415ed0ddf3791cf724 (patch)
tree3131e0e834de04962299d05fac0b04ff7f4c0a29 /src/dimensions.js
parentece001f1394aeddcfe061dcba224726173325220 (diff)
downloadjquery-2d4755a0fb1e34cc81d142415ed0ddf3791cf724.tar.gz
jquery-2d4755a0fb1e34cc81d142415ed0ddf3791cf724.zip
jquery dimensions: removed redundant code
Diffstat (limited to 'src/dimensions.js')
-rw-r--r--src/dimensions.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/dimensions.js b/src/dimensions.js
index 2ba8f670d..f438db0cf 100644
--- a/src/dimensions.js
+++ b/src/dimensions.js
@@ -3,24 +3,22 @@ jQuery.each([ "Height", "Width" ], function(i, name){
var tl = i ? "Left" : "Top", // top or left
br = i ? "Right" : "Bottom", // bottom or right
- lower = name.toLowerCase();
+ type = name.toLowerCase();
// innerHeight and innerWidth
jQuery.fn["inner" + name] = function(){
return this[0] ?
- jQuery.css( this[0], lower, false, "padding" ) :
+ jQuery.css( this[0], type, false, "padding" ) :
null;
};
// outerHeight and outerWidth
jQuery.fn["outer" + name] = function(margin) {
return this[0] ?
- jQuery.css( this[0], lower, false, margin ? "margin" : "border" ) :
+ jQuery.css( this[0], type, false, margin ? "margin" : "border" ) :
null;
};
- var type = name.toLowerCase();
-
jQuery.fn[ type ] = function( size ) {
// Get window width or height
return this[0] == window ?