@extends('../layout/' . $layout) @section('subhead')
const myAccordion = tailwind.Accordion.getOrCreateInstance(document.querySelector("#myAccordion"));
const myAccordion = tailwind.Accordion.getInstance(document.querySelector("#myAccordion"));
myAccordion.hide();
myAccordion.show();
myAccordion.toggle();
Event type | Description |
---|---|
show.tw.accordion | This event fires immediately when the show instance method is called. |
hide.tw.accordion | This event is fired immediately when the hide instance method has been called. |
const myAccordionEl = document.getElementById('myAccordion')
myAccordionEl.addEventListener('hidden.tw.accordion', function (event) {
// do something...
})