FANDOM


{{{1}}}
Template documentation (for the above template, sometimes hidden or invisible)

source

openwetware

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

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

link to var2 | link to var1


Disclaimer: This is not our template. We first found it here.


Community content is available under CC-BY-SA unless otherwise noted.