Allow Anchor to expand accordion menu.

Asked on May 24, 2016 in How To.

I am aware that this post could be in a different topic as well..

I am trying to use an Anchor ID to scroll to a Layers Pro accordion. This is working, but the accordion is not expanding upon view, only once clicked, the accordion will expand.

1. Is there any option to couse the accordion tab to expand right away (so immidiatly after clicking the anchor button earlier on the page?)?
2. Is there a way to show an accordion tab in expanded view by default (instead of collapsed)?

Thanks

Still looking for a possible solution.

#LayersTEAM, do you have any solutions perhaps?

on June 7, 2016.
Reply
1 Answer(s)
Answered on June 8, 2016.

Hi there,

Please note that we do not monitor these forums often for customization help – we look to the community to offer that to each other.

The accordions toggle using jquery. Your anchor only targets a name attribute in an URL, it isn’t passing any instructions to do anything else. To do that, you need custom jQuery that tells the link to jump and then adds a class to the accordion to set it to its open state. I can’t really get into how you would go about that here so I recommend checking in with the jQuery folks at stackexchange if you need a full code example.

Reply