|
<?xml version="1.0" encoding="ISO-8859-1"?>
<x_symbol id='xFirstChild'>
<sources>
<src><file>xfirstchild.js</file><note><![CDATA[Default.]]></note></src>
</sources>
<copyright>Copyright 2004-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>DOM</grp>
</groups>
<type>Function</type>
<description><![CDATA[An enhanced wrapper for element.firstChild.]]></description>
<syntax>xFirstChild(ele[, tag])</syntax>
<parameters>
<par>
<name>ele</name>
<note><![CDATA[id string or object reference]]></note>
</par>
<par>
<name>tag</name>
<note><![CDATA[tagName string - optional. Case-insensitive.]]></note>
</par>
</parameters>
<return>Returns ele's first child with nodeName == tag (if tag is defined), else with nodeType == 1.</return>
<demos>
<demo>
<url>http://cross-browser.com/toys/</url>
<note><![CDATA[Index of all X demos.]]></note>
</demo>
</demos>
<revisions>
<rev>
<num>4</num><date>1Dec06</date><author>mf</author>
<note><![CDATA[Re-written to be smaller and more robust.]]></note>
</rev>
<rev>
<num>3</num><date>31Oct06</date><author>mf</author>
<note><![CDATA[The tag comparison is now case-insensitive. xGetElementById is now called for e so the first argument can be an element or id string.]]></note>
</rev>
<rev>
<num>2</num><date>11Mar05</date><author>mf</author>
<note><![CDATA[put in it's own file for use with XC]]></note>
</rev>
<rev>
<num>1</num><date>27Jan05</date><author>mf</author>
<note><![CDATA[Implemented xPrevSib, xNextSib and xFirstChild (need optimizing).]]></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.