Bug Tracker

Ticket #201: dimensions.diff

File dimensions.diff, 1.1 KB (added by [email protected], 15 years ago)

The diff.

Line 
1@@ -76,10 +76,10 @@
2  * @cat Dimensions
3  */
4 $.fn.innerHeight = function() {
5-       return this.get(0) == window || this.get(0) == document ?
6-               this.height() :
7-               this.get(0).offsetHeight - parseInt(this.css("borderTop")) - parseInt(this.css("borderBottom"));
8-};
9+       return this.get(0) == window || this.get(0) == document ?
10+               this.height() :
11+               this.get(0).offsetHeight - parseInt(this.css("borderTop") || 0) - parseInt(this.css("borderBottom") || 0);
12+};
13 
14 /**
15  * Returns the inner width value (without border) for the first matched element.
16@@ -94,10 +94,10 @@
17  * @cat Dimensions
18  */
19 $.fn.innerWidth = function() {
20-       return this.get(0) == window || this.get(0) == document ?
21-               this.width() :
22-               this.get(0).offsetWidth - parseInt(this.css("borderLeft")) - parseInt(this.css("borderRight"));
23-};
24+       return this.get(0) == window || this.get(0) == document ?
25+               this.width() :
26+               this.get(0).offsetWidth - parseInt(this.css("borderLeft") || 0) - parseInt(this.css("borderRight") || 0);
27+};
28 
29 /**
30  * Returns the outer height value (including border) for the first matched element.