I built this site a few months ago:
It is a pure Foundation site.
I would like to build better left side nested accordion menu, like https://get.foundation/sites/docs site left side accordion, where the accordion item link keep the active state after page reload (when the new content load to right side).
Actually I can’t find the simple solution for this.
Thank you for help!
This component is called Magellan.
Did you already try this?
Long time ago I used a Magellan to build a landing page, but after I forget it…
Thank you very mutch for a quick help!
I tried, but it is not the perfect solution for me. If you see the https://get.foundation/sites/docs/ LEFT accordion, I want same like this. After page reload, the left side accordion link keep the active state (the link is blue, not gray). I can’t find any similar soultion in Foundation Kitchen Sink.
Can you help?
We do multiple things. We track the state if it should be expanded using the localstorage: https://github.com/foundation/foundation-sites/blob/0f9fea524fec599999fdd952d55de94635f75227/docs/assets/js/docs.js#L25, we
And we manually set the
is-current classes depending on the current page, see https://github.com/foundation/foundation-sites/blob/0f9fea524fec599999fdd952d55de94635f75227/docs/partials/component-list.html#L29-L32
And there is also https://get.foundation/sites/docs/accordion.html#accordion-and-urls
Yep, it works for me…
The panini handlebar in li tag is very fine!
Thanks a lot!