91 lines
2.6 KiB
XML
91 lines
2.6 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
|
|
<xlib_symbol id='xCollapsible'>
|
|
|
|
<copyright>Copyright 2004-2005 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>Object</grp>
|
|
</groups>
|
|
<type>Object</type>
|
|
|
|
<description><![CDATA[Creates a collapsible list from nested ULs or nested DIVs.
|
|
A UL/DIV is a "target" - it will have its display toggled when its
|
|
"trigger" is clicked (except for the outermost UL/DIV).
|
|
For ULs the trigger is the UL's previous sibling element.
|
|
For DIVs the trigger is also the DIV's previous sibling element,
|
|
but it must be a heading element (H1, H2, etc.).]]></description>
|
|
|
|
<syntax>new xCollapsible(outerEle, bShow)</syntax>
|
|
|
|
<parameters>
|
|
<par>
|
|
<name>outerEle</name>
|
|
<note><![CDATA[the id string (or object reference) of the outermost UL/DIV]]></note>
|
|
</par>
|
|
<par>
|
|
<name>bShow</name>
|
|
<note><![CDATA[if true, all targets are displayed initially]]></note>
|
|
</par>
|
|
</parameters>
|
|
|
|
<methods>
|
|
<meth>
|
|
<name>displayAll</name>
|
|
<note><![CDATA[set the display of all targets]]></note>
|
|
</meth>
|
|
<meth>
|
|
<name>onUnload</name>
|
|
<note><![CDATA[mainly for IE, removes circular references]]></note>
|
|
</meth>
|
|
</methods>
|
|
|
|
<dependencies>
|
|
<dep>xGetElementById</dep>
|
|
<dep>xGetElementsByTagName</dep>
|
|
<dep>xPrevSib</dep>
|
|
</dependencies>
|
|
|
|
<demos>
|
|
<demo>
|
|
<url>http://cross-browser.com/x/examples/xmenu5.php</url>
|
|
<note><![CDATA[Three xCollapsible examples]]></note>
|
|
</demo>
|
|
</demos>
|
|
|
|
<comments>
|
|
<comment>
|
|
<date>28Apr05</date>
|
|
<author>mf</author>
|
|
<note><![CDATA[The unload listener is because of IE's circular reference memory leak bug. You have to test for the existence of everything because of Opera's back button feature (which I like). I get around this by only unloading for IE.]]></note>
|
|
</comment>
|
|
<comment>
|
|
<date></date>
|
|
<author>mf</author>
|
|
<note><![CDATA[Note that Opera (currently using 7.54u2) will issue a window.onunload event for this: location.href = '#topofpg']]></note>
|
|
</comment>
|
|
</comments>
|
|
|
|
<revisions>
|
|
<rev>
|
|
<num>3</num>
|
|
<date>28Apr05</date>
|
|
<author>mf</author>
|
|
<note><![CDATA[Only run unload for IE]]></note>
|
|
</rev>
|
|
<rev>
|
|
<num>2</num>
|
|
<date>25Apr05</date>
|
|
<author>mf</author>
|
|
<note><![CDATA[Somewhat re-implemented. Added displayAll method]]></note>
|
|
</rev>
|
|
<rev>
|
|
<num>1</num>
|
|
<date>7Mar05</date>
|
|
<author>mf</author>
|
|
<note><![CDATA[Moved from xmenu5.js]]></note>
|
|
</rev>
|
|
</revisions>
|
|
|
|
</xlib_symbol>
|