100-project-100-days-website/100_projects/38-modal-popup-button/main.js
2023-03-31 03:25:50 +03:00
Ask

11 lines
315 B
JavaScript

{f2d177a4609df3dc12547acdf1a3fc1d6805174e true 315 main.js 0xc001e1ce70}

const open = document.getElementById("open");
const container = document.getElementById("container");
const close = document.getElementById("close");
open.addEventListener('click', ()=> {
container.classList.add('show')
});
close.addEventListener('click', ()=> {
container.classList.remove('show')
});