Commit d44ddef7 authored by John Resig's avatar John Resig

Made outerHeight/outerWidth accept .outerWidth(true) to include the margin. If...

Made outerHeight/outerWidth accept .outerWidth(true) to include the margin. If any options are passed in it's assumed that you want the margin included.
parent 8f14ee1d
...@@ -111,15 +111,12 @@ jQuery.each(["Height", "Width"], function(i, name){ ...@@ -111,15 +111,12 @@ jQuery.each(["Height", "Width"], function(i, name){
}; };
// outerHeight and outerWidth // outerHeight and outerWidth
jQuery.fn["outer" + name] = function(options) { jQuery.fn["outer" + name] = function(margin) {
options = jQuery.extend({ margin: false }, options);
return this["inner" + name]() + return this["inner" + name]() +
num(this, "border" + tl + "Width") + num(this, "border" + tl + "Width") +
num(this, "border" + br + "Width") + num(this, "border" + br + "Width") +
(options.margin ? (!!margin ?
num(this, "margin" + tl) + num(this, "margin" + br) : num(this, "margin" + tl) + num(this, "margin" + br) : 0);
0);
}; };
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment