About the Tips & Tricks category

Share your tips and tricks here! Bonus points for downloadable Zip files containing a working demo.

If you have a larger project you’d like to share with us, please use the ‘Animation Gallery’ category.

enclosed is a Hype file with a very basic accordion, which is however suitable for one of my hype projects.
I spent much time going through the forums to find an easy answer to a JS accordion, with little success - it all seemed to get really complicated fast. The code is a bit clunky in my example - but hey it works!
It seems to me that a way forward with Hype is to have a library of easy to use widgets so that you don’t have to reinvent the wheel with every project.
I’m posting this to share but also because I’m completely stumped about adding collapsible functionality to the accordion - in a straightforward way! Any help appreciated

basic js accordion .zip (172.8 KB)