Skip to content

toast example is broken? #37577

Answered by AucT
AucT asked this question in General
Dec 3, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Here you go fixed example:

const toastTrigger = document.getElementById('liveToastBtn');
const toastLiveExample = document.getElementById('liveToast');
const toastBootstrap = new bootstrap.Toast(toastLiveExample);
if (toastTrigger) {
    toastTrigger.addEventListener('click', () => {
        toastBootstrap.show();
    });
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

mdo Dec 7, 2022
Maintainer

Answer selected by AucT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants