Multiple expanding/collapsing boxes - Automate?

Well first of all, did you look into the CONSOLE?
Or the better question is → do you know what the CONSOLE-function is?

If not…
Open your project in “Preview-Mode” in your Wix-Editor. At the bottom of the screen, you will see the CONSOLE and all its “log-messages”.
The same you will get, when you use for example “google-Chrome” and press F-12 and go to CONSOLE.

In the CONSOLE you will see all the results and steps, which you have integrated into your own CODE. This little message-logs, should be your best friend, when you do some codings.

You ask yourself why? Because, if you use CONSOLE-Logs you will be able to understand your own CODE a way better.

This is also why i implemented some CONSOLE-Logs into your CODE, to show you how your CODE is working, and what your CODE is doing in every single step.

Of course the code is not complete, but i hoped you will recognize the way to continue the coding.

What does the code do right now?

When you click on one of the buttons, what happens?
Is your CODE already able to differ between “readMoreButtons” and "readLessButtons? YES, is already recognize the difference between this two different types of buttons.

But there is a QUESTION! What is in your project a “collapsedState” ???
You surely use a Multi-State-Box. But what is in your project a “collapsed-state” ???

Why you don’t just collapse the whole mulstistate-box, when one of the read-buttons were clicked? Or why you do not use just one COLLAPSED-STATE for all “readLess”-buttons? Do the collapsed-states differs to each other?

As you can see, there are a lot of ways how to design und structure his project.
But i do not have any idea, how is structured your project, so you will have to work on it by yourself, because you know the structure of your own project best.

Another idea would be to use a LOOP. Looping trough all states of your “multi-state-box” to show collapsed states of the MSB.