Scroll to and open accordion using toggle hash in X-Theme

Hello - I am following up on another thread I started: https://theme.co/apex/forum/t/open-accordion-with-anchor-link-without-cornerstone/53353/2

I am now trying to scroll to and open an accordion using Cornerstone in X-Theme.

I have add the code to the toggle hash and the accordion opens, but it is not scrolling to the location on the page.

I have 2 items in the list on this page that are linked to an accordion for your review.

Appreciate your help, thank you!

Hey @ccwadsworth,

You will need to assign an ID the same as your Toggle Hash too. The Toggle Hash is only for opening the accordion. The ID is for linking the fragment identifier which is the hash in the URL to the section.

Please make sure you don’t have Javascript errors in your site as that feature is powered by Javascript. Currently, I see an error in your site coming from a custom JS. Please remove the error in Theme Options > JS.

Hope that helps.

1 Like

That was the missing piece, thank you very much! I removed the JS.
Appreciate your help, thank you!

You’re welcome. Glad we’re able to help.

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