Join the chatroom to ask for an account or meet the community!


<html></html> <html></html>This template displays a link that can be used to make collapsible information using a script we stole from ED.

It degrades cleanly with JS disabled.

Parameters

  • text - The text of the link displayed when Javascript is turned off. Leave empty if you don't want to display anything with JS off.
  • expand - The text of the "expand" link displayed when Javascript is turned on and the content is collapsed. If you filled in text, you can leave it empty, and text will be used preceded by a disclosure triangle (see examples)
  • collapse - The text of the "collapse" link displayed when Javascript is turned on and the content is displayed. If you filled in text, you can leave it empty, and text will be used preceded by a disclosure triangle (see examples)
  • initialstate - default visibility of the content. 1 = visible - 0 = hidden. Default: 0
  • id - The id of the element to hide. Required.

Examples

Example 1

<html><aa></html>text=SPOILER |id=spoiler |initialstate=1 <strong id="spoiler">YOU DIES</strong><html></aa></html>

<html><strong id="spoiler"></html>YOU DIES<html></strong></html>

Example 2

<html><aa></html>collapse=[hide] |expand=[show] |id=andiwanttodie

I hate myself

And I want to die

<html></aa></html>

<HTML>

</HTML>
I hate myself

<HTML>

</HTML>
And I want to die

<HTML>

</HTML>
Note: With javascript turned off, both lines are visible by default, and no [show]/[hide] link is shown.

Hints

  • See how it's used in :Template:DQN Art
  • Remember that an id can only be used once in a page
  • The content to hide and the collapse link can be on different parts of the page.

<html></html>

Navigation
Print/export