X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fdimensions.js;h=606b105eb9847a91d7c2bbbeb2ff3bd9b0c32eaf;hb=f8ef75eb9124ce924be5fb521c783efd5c996e33;hp=f438db0cfe3de3b44d99ab4f585c71ae0df80056;hpb=2d4755a0fb1e34cc81d142415ed0ddf3791cf724;p=jquery.git diff --git a/src/dimensions.js b/src/dimensions.js index f438db0..606b105 100644 --- a/src/dimensions.js +++ b/src/dimensions.js @@ -1,9 +1,7 @@ // Create innerHeight, innerWidth, outerHeight and outerWidth methods jQuery.each([ "Height", "Width" ], function(i, name){ - var tl = i ? "Left" : "Top", // top or left - br = i ? "Right" : "Bottom", // bottom or right - type = name.toLowerCase(); + var type = name.toLowerCase(); // innerHeight and innerWidth jQuery.fn["inner" + name] = function(){ @@ -18,7 +16,7 @@ jQuery.each([ "Height", "Width" ], function(i, name){ jQuery.css( this[0], type, false, margin ? "margin" : "border" ) : null; }; - + jQuery.fn[ type ] = function( size ) { // Get window width or height return this[0] == window ?