Streaming live at 10am (PST)

Auto close unactive accordion tabs

How can I use interactions to ony allow one active tab to be open? I want to autoclose the unactive tabs when switching between them.

http://test-b0ecf2.webflow.io/interactive-elements/accordion

Can you please share you public share link with us. That would make it easier. Thanks! :wink::+1:

Just add an interaction to each that closes all of the others when it is opened. If they are already closed it won’t do anything, but if one is open it will be closed.

Sure! Here is the link. The page is called Accordion

https://preview.webflow.com/preview/test-b0ecf2?preview=ea7ed3e7c7909c07e20aa195892aa08e

Under the folder Interactive elements

@theyurisin

Hey! Why not use the dropdown widget? It’s super easy to use and set up and solves your problem :slightly_smiling:
I use it on pretty much every website I use.

See this for demo and instructions “Dropdown - Dropdown widget as accordion”: http://webflowcodestutorials.webflow.io/click

If you have any questions, just ask me :slightly_smiling:

1 Like

That seems to work quite nice. How can I add an interaction the auto-closes all unactive BUT open tabs? So I always only have one tab open at a time.

I think I got it now. Such an awesome tip. Thanks Steven!

https://preview.webflow.com/preview/drop-down?preview=79b932b6220d5141ec85ccd9b97b5fb3

Hey @theyurisin . Make sure to tag Steven so he would be alerted that you have replied to him. This can be done by pressing the @ symbol and then selecting his name in the list. Thanks!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.