Black Screen Issue: Please update your theme to ensure WordPress 5.6 compatibility. Dentalia 2.1 and Recycle 2.1 are now available on ThemeForest. 

Okay
  Public Ticket #1944186
Accordion scroll and open
Closed

Comments

  • 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?

  •  530
    OrionThemes replied

    Hi,

    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 

    8493318886.png

    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,
    Andrej