htmlcssjavascript28
Silver Coder
Click on one of the blue buttons 2 times.
The same button.
Clicking the close button should keep the curtain removed.
Edit fiddle - JSFiddle - Code Playground
You will notice that, the curtain is still going up when clicked on a 2nd time.
What am I doing wrong or forgetting to do?
I am confused here.
The same button.
Clicking the close button should keep the curtain removed.
Edit fiddle - JSFiddle - Code Playground
You will notice that, the curtain is still going up when clicked on a 2nd time.
What am I doing wrong or forgetting to do?
I am confused here.
JavaScript:
function openModal(target) {
const modal = document.querySelector(target);
modal.classList.add("active");
modal.querySelector(".curtainB").classList.add("slide");
modal.querySelector(".wrapB").classList.add("visible");
}
JavaScript:
function closeModal(modal) {
modal.classList.remove("active");
modal.querySelector(".curtainB").classList.add("hide");
modal.querySelector(".wrapB").classList.remove("visible");
removePlayer();
}
Last edited: