Board Thread:Support Requests - Getting Technical/@comment-4356266-20150828150639/@comment-1757994-20150901012449

I posted some JS here. If you run it from MediaWiki:Common.js, you may want to wrap it in a conditional that tests. Of course, you can run it from your browser scratchpad, too, just to play around. Otherwise, the only thing that should be required is wrap normal wiki mark-up with an element with.

My test mark-up above has nested accordions. Not everything has to be an accordion just because the test mark-up has it.

There appear to be some bugs in the version of jQuery UI at Wikia. The example on the jQuery UI site linked by the OP works flawlessly. The code at Wikia a little less so, so there are some work-arounds in my code. I also tested on Wikipedia. One of the work-arounds is required there (initial heights and heightStyle) as well. I didn't dig any further.