Template:Toggle
From JoJo's Bizarre Encyclopedia - JoJo Wiki
Revision as of 02:41, 21 August 2015 by MetallicKaiser (talk | contribs)
{{{1}}}
{{{2}}}
source
Usage
This template has to be use in parallel with toggling functions. It will only create the element that will be hidden/shown by the function
- Parameter 1 : Default content
- Parameter 2 : Replacement content (optional)
- Parameter 3 : Toggle class name
Ex : To replace a text with another by clicking on a link
{{Toggle|xxx text |yyyy text|toto}} <span class="_toggler-toto">change text</span>
xxx text
yyyy text
change text
When the second parameter is empty, it allows to make the text from parameter 1 disappear
{{Toggle|xxx text ||tata}} <span class="_toggler-tata">hide text</span>
xxx text
hide text
To change the content by using different link
{{Toggle|var1 xxx||var1}} <!-- var1 text will be displayed at start since it is the first parameter --> {{Toggle||var2 zzz|var2}} <!-- var2 text will be hidden at start since it is the second parameter --> <span class="_toggler_hide-var1 _toggler_show-var2">link to var2</span> <span class="_toggler_hide-var2 _toggler_show-var1">link to var1</span>
var1 xxx
var2 zzz
link to var2 | link to var1
- Manga ▾
- Media ▾
- Characters ▾
- World ▾
- Archives ▾
- Misc ▾
- Wiki ▾
Retrieved from "http://jojowiki.com/index.php?title=Template:Toggle&oldid=252074"