From 3478f3eb15d3ee919ed8fd9e5da914fff4b3c8a3 Mon Sep 17 00:00:00 2001 From: Ravikumar Date: Sat, 1 Apr 2023 03:43:09 +0530 Subject: [PATCH] updated --- 034-animated countdown/script.js | 6 +++--- 034-animated countdown/style.css | 7 ------- 038-mobile tab navigation/script.js | 3 +-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/034-animated countdown/script.js b/034-animated countdown/script.js index d81370e..a1a13b0 100644 --- a/034-animated countdown/script.js +++ b/034-animated countdown/script.js @@ -14,14 +14,14 @@ const runAnimation = () => { nums.forEach((num, index) => { const nextToLast = nums.length - 1; num.addEventListener("animationend", (e) => { - if (e.animationName === "goIn" && index !== nextToLast) { + if (e.animationName === "goIn" && index !== nast) { num.classList.remove("in"); num.classList.add("out"); - } else if (e.animationName === "goOut" && num.nextElementSibling) { + } else if (e.animationName === "goOut" && num.nextElementSibli num.nextElementSibling.classList.add("in"); } else { counter.classList.add("hide"); - finalMessage.classList.add("show"); + finalMessage.classList.add(" } }); }); diff --git a/034-animated countdown/style.css b/034-animated countdown/style.css index 5ec6931..0b53421 100644 --- a/034-animated countdown/style.css +++ b/034-animated countdown/style.css @@ -18,13 +18,6 @@ h4 { } .counter { - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - text-align: center; -} - .counter.hide { transform: translate(-50%, -50%) scale(0); animation: hide 0.2s ease-out; diff --git a/038-mobile tab navigation/script.js b/038-mobile tab navigation/script.js index 09ef1b7..14dd3d9 100644 --- a/038-mobile tab navigation/script.js +++ b/038-mobile tab navigation/script.js @@ -7,8 +7,7 @@ const hideAllContents = () => { const hideAllItems = () => { listItems.forEach((item) => item.classList.remove("active")); }; - -listItems.forEach((item, index) => { +{ item.addEventListener("click", () => { hideAllContents(); hideAllItems();