- // Handle extra width/height provided by the W3C box model
- var ph = (!jQuery.boxModel ? 0 :
- jQuery.css(e,"paddingTop") + jQuery.css(e,"paddingBottom") +
- jQuery.css(e,"borderTopWidth") + jQuery.css(e,"borderBottomWidth")) || 0;
-
- var pw = (!jQuery.boxModel ? 0 :
- jQuery.css(e,"paddingLeft") + jQuery.css(e,"paddingRight") +
- jQuery.css(e,"borderLeftWidth") + jQuery.css(e,"borderRightWidth")) || 0;
-
- var oHeight, oWidth;
-
- if (jQuery.css(e,"display") != 'none') {
- oHeight = e.offsetHeight || parseInt(e.style.height) || 0;
- oWidth = e.offsetWidth || parseInt(e.style.width) || 0;
- } else {
- var els = e.style;
- var ov = els.visibility;
- var op = els.position;
- var od = els.display;
- els.visibility = "hidden";
- els.position = "absolute";
- els.display = "";
- oHeight = e.clientHeight || parseInt(e.style.height);
- oWidth = e.clientWidth || parseInt(e.style.width);
- els.display = od;
- els.position = op;
- els.visibility = ov;