Update main.js

This commit is contained in:
Sam 2022-08-26 14:52:43 +03:00 committed by GitHub
parent 013e51226b
commit a4c3f2571e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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');