# Linking to Anchor in Closed Accordion?

**URL:** <https://forums.realmacsoftware.com/t/linking-to-anchor-in-closed-accordion/48018>\
**Category:** Elements\
**Created:** [June 11, 2025, 2:35pm UTC](https://forums.realmacsoftware.com/t/linking-to-anchor-in-closed-accordion/48018 "2025-06-11T14:35:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![logrunner](https://avatars.discourse-cdn.com/v4/letter/l/59ef9b/32.png) [@logrunner](https://forums.realmacsoftware.com/u/logrunner)\
**Post date:** [June 11, 2025, 2:35pm UTC](https://forums.realmacsoftware.com/t/linking-to-anchor-in-closed-accordion/48018/1 "2025-06-11T14:35:20Z")

</div>

I have an accordion which contains a number of DevPack components (all the same) which create tables of markdown content. Some of these markdown table cells have anchors.

If the accordion is closed, and I click a link in another component on the same page that goes to an anchored table cell in the closed accordion, it doesn’t go to the linked item.

How do I get the accordion to automatically open and the linked item to be displayed when clicking this link? The linking works fine if the accordion is open.

I have asked ChatGPT the question and therefore potentially have a way to do it using javascript but thought I would check first before going down that route.

---

<div class="post-metadata">

**Author:** ![ben](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/ben/32/28488_2.png) [@ben](https://forums.realmacsoftware.com/u/ben)\
**Post date:** [June 12, 2025, 8:37am UTC](https://forums.realmacsoftware.com/t/linking-to-anchor-in-closed-accordion/48018/2 "2025-06-12T08:37:21Z")

</div>

There is no built-in way to programatically open an Accordion — you could add some custom code to do this, but you obviously run the risk of the Accordion component changing and possibly breaking you custom implementation.

Hope that helps 🙂
