https://codepen.io/Kriszzy01/pen/RwKJxQm
Hello guys, so this is basically what I intend to achieve. It works (please ignore the messy code, will fix that eventually). Issue here is because of the approach I used to make sure the first and last accordion regions remain open at the beginning and end of the scrub respectively, the transitioning for the rest of accordions differs compared to the first and last. Basically, it has this snapping nature between states which is down to directly changing the display property on the style as shown in the pen.
My question is, is there a better approach to achieving this result? This approach seems real hacky and though it works, I would prefer some consistency.