Use toggle hash to close an accordion

Hi

When using the toggle has of an accordion item i can get the accordion to open with the toggle hash URL but is it possible to close the accordion. I want to use my own icon (a companies’ brand symbol) to open and close the the accordion but the url only opens the accordion it wont close it. Can you point me in the right direction to achieve this.

many thanks

Hey @The_Capture_Factory,

URL toggle hashes only instruct the theme to scroll to and expand the target. There is no native hash URL syntax (like #close-my-accordion-item) that reverses or toggles the state via a hyperlink. Custom javascript will be needed to close the accordion item except for the accordion item header itself which is not an option for your case.

Regretfully, this functionality would require custom development which we cannot provide as part of Direct Support. If you wish, we can suggest a custom code for you in our One service. For now, what we can do is keep this as a feature request.

Thank you.