I'm trying to utilize the semantic ui accordion behavior to open and close accordions based on a button click, however this is not functioning as I would expect.
From the documentation:
$('.ui.accordion').accordion('behavior', argumentOne, argumentTwo...);
I am attempting to utilize the toggle (index)
behavior. My expectation is
$('.ui.accordion').accordion('toggle', 1);
Would open the accordion at index 1 on the page and close the others, but adding that behavior event to a click event on a button does not toggle any accordion.
CodePen of the issue here https://codepen.io/jasonyost/pen/ZxOvPW