-
I guess the official bootstrap toast recommendation is to have one toast at a time in HTML, and onclick to change text and show it again (reuse). Anyhow, today I thought to make example using official recommendation to reuse one toast and with js change color and text. Can you try click button is it me, or this official toast example has glitches when you click button again at the end of toast. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Found even issue for this #33906 |
Beta Was this translation helpful? Give feedback.
-
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();
});
} |
Beta Was this translation helpful? Give feedback.
Here you go fixed example: