![]() |
VOOZH | about |
Bootstrap 5 Toasts are a type of alert box that is used to show a message or an update to the user. For example, submitting a form, clicking a button, or maybe a push notification inside the website. The alert box type of toast is shown for a couple of seconds.
The hide() method is used to hide the toast from the display.
Syntax:
toast.hide()Return Value: This method returns to the caller before the toast has actually been hidden.
Example 1: The example below demonstrates the usage of the Toasts hide() Method using buttons that hides/closes the toast.
Output:
Example 2: The example below demonstrates the usage of the Bootstrap 5 Toasts hide() Method using buttons and with the stacking of the toasts.
Output:
Reference:https://getbootstrap.com/docs/5.0/components/toasts/#hide