MediaWiki HTML – How to Fold or Roll-Up Boxes

htmlmediawiki

In MediaWiki, if the Index at the top is large, it becomes show/hideable.

Is there a way to do this with other sections in MediaWiki?

I maintain technical documentation on an internal wiki, and I would like to be able to hide some documentation that 99% of users won't need:

Before installing Massive Application, install the JDK [show+]

Clicking on "Show+" would unroll a <pre> box with the instructions in.

Is this possible?

Best Answer

Since v1.18, out-of-the-box you can do the following (as described here):

<div class="mw-collapsible mw-collapsed">
This text is not collapsible; but the next is collapsible and
hidden by default:
<div class="mw-collapsible-content">{{Lorem}}</div>
</div>