Public Ticket #1944186
Accordion scroll and open


  • miratech started the conversation

    How can we open and scroll to one of the accordion menus? I want to link the get a quote button to an accordion tab.

    For Example on this page: https://recycle.orionthemes.com/demo-1/services/better-recycling/ I looked at the ID and presumed using this link:https://recycle.orionthemes.com/demo-1/services/better-recycling/#Metal5c94c31d023e5-panel

    Then it would scroll and open the Metal accordion item but it doesnt?

    Please can you assist with correct link or settings?

  •  347
    OrionThemes replied


    Sadly opening the panel with a link isn't possible with OrionThemes Accordion widget.

    The main reason is that the id hash in the accordions is generated randomly each time the page is refreshed. This allows multiple accordions to be displayed on the same page and work independently from each other.

    Also: The element needs to be visible so the vertical position can be calculated. The vertical position is needed in order to be able to scroll to the right location.

    The only (partial) solution I can think of, would be to add an ID to an element inside accordion panel. For example 


    which you would be able to link to by adding #yourscrollid at the end of button url.

    The panel would need to be set as open by default (so the vertical position can be calculated).

    Kind regards,