Thread:Old McDonald/@comment-26199823-20141225053746

Is it alright for us to use "Switch" template? If so, paste this in MediaWiki:Common.js to make it work. ;Description 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.

This template uses the following JavaScript codes:
 * Dependences

And:

The codes must be placed in MediaWiki:Common.js.

Toggle. Or if given as free parameters: Toggle. The switch element must have this class (you can use a tag like this):.
 * Syntax

1=/default= default text - optional. 2=/alternative= alternative text - optional. 3=/var= element ID - avoid giving the same ID two different not-related switch elements.
 * Parameters

Change a text with another through a link: Toggle and Change! give: Change!
 * Samples

If the second parameter is null, then the text will be hidden: Toggle and Hide give: Hide

To change the contents with different links:

text 1 (as first parameter is the default text) &#65279; link var1 link var2

link var1 | link var2

The "toggling classes" used by this template are: - " ": element, the ID. - " ": clicking on this element,  will be hidden. - " ": clicking on this element,  will be shown. An element can have multiple classes.
 * Other

- Source.
 * External links

 