diff --git a/animation/02-pop-up/script.js b/animation/02-pop-up/script.js index 4f7c25c..ae59fb5 100644 --- a/animation/02-pop-up/script.js +++ b/animation/02-pop-up/script.js @@ -1,13 +1,12 @@ const openButton = document.getElementById('trigger-modal'); const closeButton = document.getElementById('close-modal'); -const backdrop = document.getElementById('backdrop') function toggleModal() { const modalDiv = document.querySelector('.popup-modal'); - const backdrop = document.querySelector('.backdrop') + const backdrop = document.querySelector('.backdrop'); modalDiv.classList.toggle('show'); backdrop.classList.toggle('show'); } openButton.addEventListener('click', toggleModal); -closeButton.addEventListener('click', toggleModal); +closeButton.addEventListener('click', toggleModal); \ No newline at end of file