MCPcopy Index your code
hub / github.com/JsAaron/jQuery / getWH

Function getWH

1.2.6/src/core.js:806–814  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

804 var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
805
806 function getWH() {
807 val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
808 var padding = 0, border = 0;
809 jQuery.each( which, function() {
810 padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
811 border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
812 });
813 val -= Math.round(padding + border);
814 }
815
816 if ( jQuery(elem).is(":visible") )
817 getWH();

Callers 1

core.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected