Get or Create Instance
Static method which allows you to get the alert instance associated with a DOM element, or create a new one in case it wasn’t initialized.
const myAlert = tailwind.Alert.getOrCreateInstance(document.querySelector("#myAlert"));
Get Instance
Static method which allows you to get the alert instance associated with a DOM element.
const myAlert = tailwind.Alert.getInstance(document.querySelector("#myAlert"));
Hide
Manually hides an alert. Returns to the caller before the alert has actually been hidden (i.e. before the hidden.tw.alert event occurs).
Show
Manually opens an alert. Returns to the caller before the alert has actually been shown (i.e. before the shown.tw.alert event occurs).
Toggle
Manually toggles an alert. Returns to the caller before the alert has actually been shown or hidden (i.e. before the shown.tw.alert or hidden.tw.alert event occurs).