3,554
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible" style="display:none;">{{{show|[show]}}}</span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display:none;">{{{hide|[hide]}}}</span><div class="_toggle_inithide _toggle toggle-hidden">{{{content|{{{1}}}}}}</div><noinclude> | {{#switch:{{{1|}}} | ||
|#default=<span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible" style="display:none;">{{{show|[show]}}}</span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display:none;">{{{hide|[hide]}}}</span><div class="_toggle_inithide _toggle toggle-hidden">{{{content|{{{1}}}}}}</div> | |||
|~button=<span class="_togglegroup _toggle_initshow _toggle _toggler toggle-visible" style="display:none;">{{{show|[show]}}}</span><span class="_toggle_inithide _toggle _toggler toggle-hidden" style="display:none;">{{{hide|[hide]}}}</span> | |||
|~begin=<div class="_toggle_inithide _toggle toggle-hidden"> | |||
|~end=</div> | |||
}}<noinclude> | |||
==Purpose== | ==Purpose== | ||
This template allows easy hiding of text and other content. | This template allows easy hiding of text and other content. | ||
Line 17: | Line 22: | ||
{{Parameter|hide|This specifies the text of the link that switches the content back to being hidden.|Optional|[hide]}} | {{Parameter|hide|This specifies the text of the link that switches the content back to being hidden.|Optional|[hide]}} | ||
{{Parameter|content|This specifies the content you want to be able to hide|Optional}} | {{Parameter|content|This specifies the content you want to be able to hide|Optional}} | ||
{{clear}} | |||
===Advanced Usage=== | |||
If this isn't enough, the template can be used in parts instead, for more flexible use within tables and div boxes.<br> | |||
For advanced usage, use this code: | |||
<div style="float:left; margin-right:20px"><pre> | |||
{{hide|~button|show=|hide=}} | |||
{{hide|~begin}} | |||
Content | |||
{{hide|~end}} | |||
</pre></div> | |||
The button can be placed anywhere before <nowiki>{{hide|~begin}}</nowiki>. It will only affect the next instance of <nowiki>{{hide|~begin}}</nowiki>. Future instances require another button. | |||
{{clear}} | {{clear}} | ||
==Example== | ==Example== |