This set-up for the accordion is inside a Symbol for ease of transfer among projects. Each accordion item (3 in this demo) has its own timeline. The main timeline of the symbol is not used.
Demo project: Accordion v4c.hype.zip (21.7 KB)
Online demo here.
The timeline approach does not have any logic, so there is no way of knowing if the accordion is opened or closed when its “button” is clicked on. In this demo all accordion items set the other accordion items to “0” in their timelines - i.e. they snap shut instantly - while the selected accordion panel animates (opens) over a period of one second. Personally I don’t miss the closing animation sequence. But this approach does not adhere to the strict accordion interface of both opening & closing animations of the accordion panel.
One way around this issue using timeline only would be to have two sets of buttons that overlay each accordion item. One that triggers a timeline when the accordion item is closed and another that triggers a different timeline when it is open. But now we are starting to get complicated in our set-up, especially if we have many accordion panels. But certainly something You could explore.