mirror of
https://github.com/jquery/jquery.git
synced 2026-01-24 21:48:00 -05:00
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.
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user