Toggle an Accordion Item despite that item's Element ID changes

Hi

I have created a button that toggles an accordion item using Custom Attributes:

data-x-toggle = 1
data-x-toggleable = Element ID

The Element ID seems to change every time I make changes to the page, where the button and the accordion item are.

Example: e15609-e23 changes to e15609-e24 when a new div element is added.

How do I ensure that my button works and opens the specific accordion item constanlty, even though that ID changes?

Thanks :slightly_smiling_face:

Any idea on this one? :smiley:

Hey Mathias,

Each Accordion Item has a Toggle Hash field under Customize. Type in a name to it and in the Button element or any link, type # followed by the Toggle Hash name. Check out the screenshots for an example below.

That should open up the Accordion Item. Just note though that it currently cannot be closed. I’ll post this case in our issue tracker so that our development team will be made aware of this and they might add a feature that will really toggle (open close) the accordion using the Toggle Hash.

image

image

Thanks.

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