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