From 57642063b43ba82463d444fc89b31a0529de1bb5 Mon Sep 17 00:00:00 2001 From: Eugene Chernik Date: Tue, 14 Nov 2023 16:27:00 +0300 Subject: [PATCH] Fixed js --- favicon.ico | Bin 0 -> 2438 bytes index.html | 1 + script.js | 25 +++++-------------------- 3 files changed, 6 insertions(+), 20 deletions(-) create mode 100644 favicon.ico diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..ed805b8c43604f318ffe3949a30c103eea39dae8 GIT binary patch literal 2438 zcmcImSyNL<7`^l8>paY}Rr)Yb^UGWiQOBj!QOnV)sZjw%K~&TMS7yc#2nj?M2@uvq zkgx_p2unZ`2qa-Se&@S%3UMhdwNssYZ};s!-*Udw*Rp<+-_D;c{##i)EbAA`vVN7m zQ~GY{9M>juyMD8~Jz!bbYzs>(D5>tmO=laX=NHZJd)JPE37ouLgRJ}toV)8q-|Lyo z{Bkml(%JwH7E~hpS|#qdI7MpMopbpIurJS{cGGt5 zai+wJ{;^rJJ&1q&rW=Q@SA7(p`zcQ{xeoO+Bys!u@eA;|v?hSz$vGS;bZOo_?L%nld5yzj zBW>ZkZpp(w!KIClp1;(!w1x3A?Q{64^cwQYeTv6ivXwXXVvpe8c6H#@=nQfsZ^w(> zh|Db_CY(5X@43b(I2=)Y+FDrQ2N@TToRO!@g=vv!Jd^)H;otiD1`?7x`kqX$;>uH> za;UC*M3*q`-1Amd2YSNO%G*7{0xSFZIhcthIaYF1vfWRF8`)+7$otlO}LI`K|gRx;Qd9FMPH2$KmT! z&d?s}4>jKC4>?AAFP7CS4mH3u^sM-fj6L6-m{zc$V;x{Hv-R}aAZESo*ZTFk4g;W Document +
diff --git a/script.js b/script.js index 37a6ea2..8dfa92b 100644 --- a/script.js +++ b/script.js @@ -1,15 +1,8 @@ - // Модальное окно const modal = document.getElementById("modal"); // Кнопка открытия const btns = document.getElementsByClassName("btn-reserve"); // Кнопки модального окна const span = document.getElementsByClassName("close"); // Кнопки закрытия -// Изменение стилей (отображения) при клике -// btn.onclick = function() { -// modal.style.display = "block"; -// } -// span.onclick = function() { -// modal.style.display = "none"; -// } + // Если кликнуть на модальном окне, оно отключится window.onclick = function(event) { if (event.target == modal) { @@ -29,20 +22,12 @@ function closeNav() { // Перебор кнопок for(let elem of btns){ elem.onclick = function() { - if (modal.style.display === "block") { - modal.style.display = "none"; - } else { - modal.style.display = "block"; - } - }; + modal.style.display = "block" + } } // Кнопки закрытия for(let close of span){ close.onclick = function() { - if (modal.style.display === "block") { - modal.style.display = "none"; - } else { - modal.style.display = "block"; - } - }; + modal.style.display = "none" + } }