Skip to content

How make toast hide after few second without button #40800

Answered by ANU1o
Laszlo7801 asked this question in Q&A
Discussion options

You must be logged in to vote

try this

HTML

<body onload="loaderToast()"></body>

Note: If it is raw HTML use this. Otherwise while using any framework, use the outermost tag or onload function related to the framework

Javascript

function loaderToast () { const toastBootstrap = bootstrap.Toast.getOrCreateInstance(toastLiveExample) toastBootstrap.show() }

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Laszlo7801
Comment options

Answer selected by Laszlo7801
Comment options

You must be logged in to vote
1 reply
@ANU1o
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants