]> source.dussan.org Git - jquery.git/commitdiff
Added proposed fix for bug #201
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Sun, 17 Sep 2006 10:10:25 +0000 (10:10 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Sun, 17 Sep 2006 10:10:25 +0000 (10:10 +0000)
src/dimensions/dimensions.js

index a821696ee9e2020ffba7fccded8d9c885d70508d..6e6e6d6b47041c99e2d41caa1bdf1050856491a0 100644 (file)
@@ -78,7 +78,7 @@ $.fn.width = function() {
 $.fn.innerHeight = function() {\r
        return this.get(0) == window || this.get(0) == document ?
                this.height() :
-               this.get(0).offsetHeight - parseInt(this.css("borderTop")) - parseInt(this.css("borderBottom"));\r
+               this.get(0).offsetHeight - parseInt(this.css("borderTop") || 0) - parseInt(this.css("borderBottom") || 0);\r
 };
 \r
 /**\r
@@ -96,7 +96,7 @@ $.fn.innerHeight = function() {
 $.fn.innerWidth = function() {\r
        return this.get(0) == window || this.get(0) == document ?
                this.width() :
-               this.get(0).offsetWidth - parseInt(this.css("borderLeft")) - parseInt(this.css("borderRight"));\r
+               this.get(0).offsetWidth - parseInt(this.css("borderLeft") || 0) - parseInt(this.css("borderRight") || 0);\r
 };
 \r
 /**\r