]> source.dussan.org Git - jquery.git/commitdiff
Made outerHeight/outerWidth accept .outerWidth(true) to include the margin. If any...
authorJohn Resig <jeresig@gmail.com>
Sat, 15 Mar 2008 19:00:07 +0000 (19:00 +0000)
committerJohn Resig <jeresig@gmail.com>
Sat, 15 Mar 2008 19:00:07 +0000 (19:00 +0000)
src/offset.js

index 4cd58cf7fdd5d1959e48f96641d5b3a77c393142..010c57d1954e679995a77f8443178fe1ec5fe585 100644 (file)
@@ -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);
        };
        
 });