From bbf1341028bec9fae3c4624d3dc113a176749474 Mon Sep 17 00:00:00 2001 From: Amar Date: Thu, 20 May 2021 09:48:36 +0200 Subject: [PATCH] fixes #1, fermeture de la modale --- starterOnly/modal.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/starterOnly/modal.js b/starterOnly/modal.js index 694a848564..ae253c82fd 100644 --- a/starterOnly/modal.js +++ b/starterOnly/modal.js @@ -20,4 +20,9 @@ function launchModal() { modalbg.style.display = "block"; } +// fermer la modale +const closeModalBtn = document.querySelector(".close"); +closeModalBtn.addEventListener("click", function(){ + modalbg.style.display = "none"; +});