Manual:Collapsible elements

How to make collapsible frames as seen on Wikipedia (W:Wikipedia:NavFrame). This page copies material from Wikipedia hence it's not in the public domain manual namespace.

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

Markup
The following markup in pages now makes collapsible sections: