I'm trying to created an unordered list that is collapsible. The list has multiple levels. So, for example:
List Title (show/hide)
- Level 1a
- Level 2a
- Level 2b
- Level 3a
- Level 2c
- Level 1b
I want to be able to click on the List Title and have it collapse the whole list. I was using something like this:
<ul class="mw-collapsible mw-collapsed" data-collapsetext="List Title (hide)" data-expandtext="List Title (show)">
<li>Level 1a</li>
<ul>
<li>Level 2a</li>
<li>Level 2b</li>
<ul>
<li>Level 3a</li>
</ul>
<li>Level 2c</li>
</ul>
<li>Level 1b</li>
</ul>
However, it only collapses the first level. Is it possible to collapse the whole list and, if so, what am I missing?