Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Essemey committed May 16, 2021
1 parent 390c9b5 commit 6d5317d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions starterOnly/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@ function editNav() {
const modalbg = document.querySelector(".bground");
const modalBtn = document.querySelectorAll(".modal-btn");
const formData = document.querySelectorAll(".formData");
const modalCloseBtn = document.querySelectorAll(".close")

// launch modal event
modalBtn.forEach((btn) => btn.addEventListener("click", launchModal));

// launch close modal event
modalCloseBtn.forEach((btn) => btn.addEventListener("click", closeModal));

// launch modal form
function launchModal() {
modalbg.style.display = "block";
}

//Close modal form
function closeModal() {
modalbg.style.display = "none";
}


0 comments on commit 6d5317d

Please sign in to comment.