Manual:Collapsible elements

jQuery.makeCollapsible

 * See also jQuery.makeCollapsible documentation for more information about how it works.

Add the class " " to an element.

For example: Gives: This is text is collapsible.

To set the initial state as collapsed add " ", such as seen in the following table:

You can so specify a specific part as being the collapsible content

Gives: This is text is not collapsible. But the next is collapsible and is also hidden by default:

If you want your collapse/expand toggles to appear like normal (Vector skin) links, put the following CSS in your MediaWiki:Common.css:

/* For mw-collapsible toggles to make them look like regular links */ /* :visited, :hover, and :active pseudoclasses must always be in that order! */ .pseudolink { cursor:pointer; color:#0645AD; } .pseudolink:visited { color:#0B0080; } .pseudolink:hover { text-decoration:underline; } .pseudolink:active { color:#faa700; }

Common.js script (before 1.18)
How to make collapsible tables as seen on the English Wikipedia. This script only applied to tables.

Setup
Copy and paste the following text into your wiki's MediaWiki:Common.js and MediaWiki:Common.css:

Markup
The following markup in pages now makes collapsible sections:


 * Result: