foundation-sites
foundation-sites copied to clipboard
[Accordion] Javascript up and down methods not working
Expected Behavior
It should be possible to open an Accordion tap using the JavaScript 'down' method described in the documentation
Current Behavior
The 'down' action seems to close the the target element.foundation('down', elementToOpen);
'up' seems to have no effect
Test Case and/or Steps to Reproduce
Test Case: https://codepen.io/aderowbotham/pen/YzgKjjE?editors=1111
Context
I am writing the accordion dynamically with javascript / jQuery then initialising it, this is because the data is read from an API response, and cannot be pre-rendered in the HTML page
This is possible related to https://github.com/foundation/foundation-sites/issues/12494 but not sure. However the codepen I have created may prove useful.
Checklist
- [x] I have read and follow the CONTRIBUTING.md document.
- [x] This is a bug report or a feature request.
- [x] There are no other issues similar to this one.
- [x] The issue title and template are correctly filled.