@extends('../layout/' . $layout) @section('subhead')
const myDropdown = tailwind.Dropdown.getOrCreateInstance(document.querySelector("#myDropdown"));
const myDropdown = tailwind.Dropdown.getInstance(document.querySelector("#myDropdown"));
myDropdown.hide();
myDropdown.show();
myDropdown.toggle();
Event type | Description |
---|---|
show.tw.dropdown | This event fires immediately when the show instance method is called. |
shown.tw.dropdown | This event is fired when the dropdown has been made visible to the user (will wait for CSS transitions to complete) |
hide.tw.dropdown | This event is fired immediately when the hide instance method has been called. |
hidden.tw.dropdown | This event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions to complete). |
const myDropdownEl = document.getElementById('myDropdown')
myDropdownEl.addEventListener('hidden.tw.dropdown', function (event) {
// do something...
})