Template:Toggler: Difference between revisions

Want an adless experience? Log in or Create an account.
no edit summary
(Created template)
 
No edit summary
 
Line 1: Line 1:
<span class="_togglegroup _toggle _toggler _toggler-{{{3|}}}">{{{1}}}</span><span class="_toggle _toggler _toggler-{{{3|}}}" style="display:none;">{{{2}}}</span><noinclude>
<onlyinclude><span class="_togglegroup _toggle _toggler _toggler-{{{3|}}}">{{#switch:{{{default|hide}}}|hide={{{1|[show]}}}|show={{{2|[hide]}}}}}</span><span class="_toggle _toggler _toggler-{{{3|}}}" style="display:none;">{{#switch:{{{default|hide}}}|hide={{{2|[hide]}}}|show={{{1|[show]}}}}}</span></onlyinclude>
{{Cat|Formatting Templates}}</noinclude>
 
==Purpose==
This template creates a button used to toggle elements which may be hidden with {{Temlink|Toggle}}.
 
==Usage==
Depending on the requirements, it may be easier to use {{Temlink|Hide}}, or it may be necessary to manually define classes (view this page's source). As for this template:
 
{{Usage|show text|hide text|class|default{{=}}hide}}
{{Usage/Param|show text|Text to display on the 'show' button|optional|[show]}}
{{Usage/Param|hide text|Text to display on the 'hide' button|optional|[hide]}}
{{Usage/Param|class|If specified, the button will toggle elements with this class. Otherwise it toggles elements with the "_toggle" class within its toggle group.|optional}}
{{Usage/Param|default|Change which button to use by default. Alternatively, one can simply switch the first two parameters.|optional|hide}}
 
 
{{Cat|Utility Templates}}