Template:Toggle/doc

Source
openwetware, specifically copied from the Fairy Tail Wiki

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

change text

change text

When the second parameter is empty, it allows to make the text from parameter 1 disappear

hide text

hide text

To change the content by using different link link to var2 link to var1

link to var2 | link to var1

Template Data
{	"params": { "1": {			"required": true, "label": "Default content", "description": "The default content that can then be toggled", "type": "line", "autovalue": "" },		"2": {			"required": true, "label": "Alternate content", "description": "The alternate content that can be toggled to. Leave empty to make the default content disappear without a replacement", "type": "line", "autovalue": "" },		"3": {			"label": "Toggle ID", "description": "Specifies which toggler on the article this content should be associated with", "type": "line", "autovalue": "1", "suggested": true }	},	"description": "Formats toggleable content", "paramOrder": [ "1",		"2",		"3"	],	"format": "inline" }