|
<?xml version="1.0" encoding="ISO-8859-1"?>
<x_symbol id='xHeight'>
<sources>
<src><file>xheight.js</file><note><![CDATA[Default.]]></note></src>
</sources>
<copyright>Copyright 2001-2007 Michael Foster (Cross-Browser.com)</copyright>
<license>Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL</license>
<groups>
<grp>Size</grp>
</groups>
<type>Function</type>
<description><![CDATA[Return and optionally set the element's height. It attempts to return and/or set the equivalent of 'offsetHeight'.]]></description>
<syntax>xHeight(ele[, uH])</syntax>
<parameters>
<par>
<name>ele</name>
<note><![CDATA[id string or object reference]]></note>
</par>
<par>
<name>uH</name>
<note><![CDATA[unsigned integer height; it is rounded to an integer]]></note>
</par>
</parameters>
<return>integer</return>
<dependencies>
<dep>xGetElementById</dep>
<dep>xNum</dep>
<dep>xDef</dep>
<dep>xStr</dep>
<dep>xGetComputedStyle</dep>
</dependencies>
<demos>
<demo>
<url>http://cross-browser.com/toys/</url>
<note><![CDATA[Index of all X demos.]]></note>
</demo>
</demos>
<revisions>
<rev>
<num>6</num><date>27Apr07</date><author>mf</author>
<note><![CDATA[I went back to r4. I would like to make the r5 change, but it breaks too many demos. When you need the width/height of an element's parent, if that parent happens to be document/html/body then what you really want is clientWidth/clientHeight. I'll have to revisit this later.]]></note>
</rev>
<rev>
<num>5</num><date>23Apr07</date><author>mf</author>
<note><![CDATA[This rev reverses the first part of r4. Now it does not reference xClientHeight.]]></note>
</rev>
<rev>
<num>4</num><date>7Apr05</date><author>mf</author>
<note><![CDATA[If ele is document or html or body then return xClientHeight. This needs testing and is somewhat experimental. Also, use (pt !== null) instead of !=]]></note>
</rev>
<rev>
<num>3</num><date>12Mar05</date><author>mf</author>
<note><![CDATA[Changed xSetCH to use xGetComputedStyle and removed xGetCS. Made xSetCH inline. Reduces width/height funtions about 200 bytes.]]></note>
</rev>
<rev>
<num>2</num><date>14May04</date><author>mf</author>
<note><![CDATA[now accepts zero as valid]]></note>
</rev>
<rev>
<num>1</num><date>31Mar04</date><author>mf</author>
<note><![CDATA[put in it's own file for use with XC]]></note>
</rev>
</revisions>
</x_symbol>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have been a software developer since 2005, focusing on .Net applications with MS SQL backends, and recently, C++ applications in Linux, Mac OS X, and Windows.