How to add Custom Notifications / Alerts using HTML, CSS & JavaScript

preview_player
Показать описание
In this video, I will show you how you can easily create / design custom notification / alert message / toast using HTML, CSS & JavaScript.

Рекомендации по теме
Комментарии
Автор

i seek for chopper, i found gold, thank you great tutorial

bendo
Автор

I cleaned up your JS code a bit
function notify(type, message) {
let n =
const id =
n.setAttribute("id", id);
n.classList.add("notification", type);
n.innerText = message;


setTimeout(() => {
const toRemove = document.getElementById(id);
toRemove.remove()
}, 5000);
}

Also, you can remove line 19 in your CSS file as the font is already set at the top.

minh-dang
Автор

thank you a lot its possible to add icon and click event to notification ?

drtarik
Автор

how to implement this for contact form?

tabitasimorangkir
visit shbcf.ru