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 text is collapsible.

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

You can specify which part is the collapsible content.

Gives: This text is not collapsible; but the next is collapsible and hidden by default:

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: