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