{{{text|}}}
{{{collapse|▼ {{{text|i dunno lol}}}}}}
{{{expand|▶ {{{text|i dunno lol}}}}}}
{{{initialstate|0}}}
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 ===
{{collapsible
|text=SPOILER
|id=spoiler
|initialstate=1
}}
YOU DIES
{{collapsible
|text=SPOILER
|id=spoiler
|initialstate=1
}}
YOU DIES
=== Example 2 ===
{{collapsible
|collapse=[hide]
|expand=[show]
|id=andiwanttodie
}}
I hate myself
And I want to die
{{collapsible
|collapse=[hide]
|expand=[show]
|id=andiwanttodie
}}
I hate myself
And I want to die
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.