heroweb/templatesrcpoc/assets/js/alert.js

11 lines
300 B
JavaScript
Raw Normal View History

2024-09-02 06:01:44 +00:00
if (document.querySelector("[alert-close]")) {
var buttons = document.querySelectorAll("[alert-close]");
buttons.forEach((button) => {
button.addEventListener("click", function () {
let alert = this.closest("div[alert]");
console.log(alert);
alert.remove();
});
});
}