Update main.js
This commit is contained in:
parent
013e51226b
commit
a4c3f2571e
14
js/main.js
14
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
|
// Countdown
|
||||||
|
|
||||||
const body = document.body;
|
const body = document.body;
|
||||||
@ -20,15 +28,13 @@ function updateCountdown() {
|
|||||||
hoursEl.innerHTML = hours < 10 ? '0'+hours : hours;
|
hoursEl.innerHTML = hours < 10 ? '0'+hours : hours;
|
||||||
minutesEl.innerHTML = minutes < 10 ? '0'+minutes : minutes;
|
minutesEl.innerHTML = minutes < 10 ? '0'+minutes : minutes;
|
||||||
secondsEl.innerHTML = seconds < 10 ? '0'+seconds : seconds;
|
secondsEl.innerHTML = seconds < 10 ? '0'+seconds : seconds;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
// Time & Date (Footer)
|
||||||
// Time & Date
|
|
||||||
setInterval(function(){
|
setInterval(function(){
|
||||||
document.getElementById('date').innerHTML = Date();
|
document.getElementById('date').innerHTML = Date();
|
||||||
},1000);
|
},1000);
|
||||||
|
|
||||||
|
|
||||||
// scroll To Top
|
// scroll To Top
|
||||||
let scrollTop = document.querySelector('.scrollTop');
|
let scrollTop = document.querySelector('.scrollTop');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user