Home › Forums › General Issues › Converting tabs to select (responsive layout) › Reply To: Converting tabs to select (responsive layout)
I can see how the tabs toggle to active with the class “active” added to the <li>
.
I also see that clicking the tabs toggle visibility on items in the tabs by adding or removing the “hidden-by-tab” class.
So far, so good. What I don’t see right away is how ACF identifies which fields are associated with a given tab. So I can create the dropdown selector which would trigger the event and I could manually add the field names (e.g. acf-field-599a68e5b5919) or the data-name attribute (e.g. address_1).
But how can I programmatically distinguish and select the divs for the different tabs?
It’s a bit of a challenge to climb through the jQuery code, could you provide a sample of how the plugin does it, so I (and others with this challenge in the future) can have a roadmap to implementing such a solution? Happy to post my code when I get a final working version.
Thanks!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.