From a4c3f2571ebaa60d3a15ee0057f39c55fab12537 Mon Sep 17 00:00:00 2001 From: Sam <74021826+x39OME@users.noreply.github.com> Date: Fri, 26 Aug 2022 14:52:43 +0300 Subject: [PATCH] Update main.js --- js/main.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/js/main.js b/js/main.js index 6098a4b..8dad886 100644 --- a/js/main.js +++ b/js/main.js @@ -1,3 +1,11 @@ +// Toggle Menu +function menuToggle(){ + const menuToggle = document.getElementById('menuToggle'); + const navigation = document.getElementById('navigation'); + menuToggle.classList.toggle('active'); + navigation.classList.toggle('active'); +}; + // Countdown const body = document.body; @@ -20,15 +28,13 @@ function updateCountdown() { hoursEl.innerHTML = hours < 10 ? '0'+hours : hours; minutesEl.innerHTML = minutes < 10 ? '0'+minutes : minutes; secondsEl.innerHTML = seconds < 10 ? '0'+seconds : seconds; -} +}; - -// Time & Date +// Time & Date (Footer) setInterval(function(){ document.getElementById('date').innerHTML = Date(); },1000); - // scroll To Top let scrollTop = document.querySelector('.scrollTop');