Skip to content
Permalink
Browse files

Made outerHeight/outerWidth accept .outerWidth(true) to include the m…

…argin. If any options are passed in it's assumed that you want the margin included.
  • Loading branch information
jeresig committed Mar 15, 2008
1 parent 8f14ee1 commit d44ddef720684d1eccba8cfe7d1afbaac5327378
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/offset.js
@@ -111,15 +111,12 @@ jQuery.each(["Height", "Width"], function(i, name){
};

// outerHeight and outerWidth
jQuery.fn["outer" + name] = function(options) {
options = jQuery.extend({ margin: false }, options);

jQuery.fn["outer" + name] = function(margin) {
return this["inner" + name]() +
num(this, "border" + tl + "Width") +
num(this, "border" + br + "Width") +
(options.margin ?
num(this, "margin" + tl) + num(this, "margin" + br) :
0);
(!!margin ?
num(this, "margin" + tl) + num(this, "margin" + br) : 0);
};

});

0 comments on commit d44ddef

Please sign in to comment.
You can’t perform that action at this time.