Changeset 5596
- Timestamp:
- 05/14/08 17:23:44 (7 months ago)
- Files:
-
- 1 modified
-
trunk/jquery/src/dimensions.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jquery/src/dimensions.js
r5577 r5596 2 2 jQuery.each([ "Height", "Width" ], function(i, name){ 3 3 4 var tl = name == "Height" ? "Top" : "Left", // top or left5 br = name == "Height" ? "Bottom" : "Right"; // bottom or right4 var tl = i ? "Left" : "Top", // top or left 5 br = i ? "Right" : "Bottom"; // bottom or right 6 6 7 7 // innerHeight and innerWidth … … 17 17 num(this, "border" + tl + "Width") + 18 18 num(this, "border" + br + "Width") + 19 ( !!margin ?19 (margin ? 20 20 num(this, "margin" + tl) + num(this, "margin" + br) : 0); 21 21 }; … … 24 24 25 25 function num(elem, prop) { 26 elem = elem.jquery ? elem[0] : elem; 27 return elem && parseInt( jQuery.curCSS(elem, prop, true), 10 ) || 0; 26 return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0; 28 27 }
