the-glorious-startpage/js/centered-box.js

25 lines
537 B
JavaScript
Raw Normal View History

2020-06-04 07:43:09 +02:00
var centeredBox = document.getElementById("centeredBox");
2020-06-04 08:13:46 +02:00
let centeredBoxVisibility = true;
const showCenteredBox = () => {
centeredBox.classList.remove('hiddenBox');
centeredBoxVisibility = !centeredBoxVisibility;
}
const hideCenteredBox = () => {
centeredBox.classList.add('hiddenBox');
centeredBoxVisibility = !centeredBoxVisibility;
2020-06-04 07:43:09 +02:00
}
2020-06-04 08:13:46 +02:00
const toggleCenteredBox = () => {
if (centeredBoxVisibility) {
// Hide web menu
hideCenteredBox();
} else {
// Show Web menu
showCenteredBox();
}
}