Sorry for the poor title, I'm really unsure what to do here.
What I'm trying to do is make an expandable box. A simple task normally, but I'm doing this through a wiki, as a regular user. I don't have admin permissions or anything like that.
I've accomplished this in a very hacky way by using the wiki's table of contents code:
<div id="toc" class="toc" style="border:1px grey solid; height:1em; overflow:auto; background-color:rgb(38,38,38);">
<div id="toctitle">
<h2>Click to expand</h2>
</div>
<ul>[user puts their content in here]</ul>
</div>
The wiki's javascript automatically inserts an < a > button next to the < h2 > that can be clicked to show or hide the contents of the box (done through the toc id it seems). By itself this works pretty well, but when this box is used multiple times on a page, or even if there's a regular table of contents, when any show/hide button is clicked only the first box on the page is affected.
I'm open to alternate methods of making this, but < script > tags and < style > tags are both blocked by the software so I imagine those ways are scarce.
You can use class="mw-collapsible" as outlined here: https://www.mediawiki.org/wiki/Manual:Collapsible_elements