I was frustrated by the lack of options I was finding when I searched the community for a way to give users a one-click method for expanding all collapsed sections on a Confluence KB page (on an FAQ page, for example), so when my tech team solved the problem for me, I thought I'd share it with you all.
The key is to use the UI Expand macro for the collapsible sections (I had been using the Expand macro). Then you add an HTML macro to the page with script like this:
Our page starts off with the sections all collapsed. When the user clicks the button created by this HTML macro, all of the collapsed sections expand.