To create a tag for an expandable section
Insert the following tags in your topic file at the location you want the expanding section to appear:
<a onclick="doSection(foo)" class="anchorclass" href="filename.htm">Link text</a>
<DIV CLASS="divclass" ID="foo" STYLE="display: none" onclick="noSection(foo)">
This is where the text appears.
</DIV>
Where doSection
is the name of the first JavaScript function, which opens the section if it is closed, and closes it if it is open. noSection
is the name of the second JavaScript function, which closes the section when the user clicks inside it. foo
is the unique ID for this instance of the section, and filename.htm
is the target file for the link.
Example
Notes
- If you are including more than one instance of this tag on the same page, be sure that each instance has a unique ID.