mirror of
https://github.com/manilarome/the-glorious-startpage.git
synced 2024-11-23 16:13:28 +01:00
imprive centeredbox toggle
This commit is contained in:
parent
6ab4ad3193
commit
c041a059ac
@ -19,7 +19,7 @@
|
||||
z-index var(--transition-speed);
|
||||
}
|
||||
|
||||
#centeredBox.hiddenBox {
|
||||
.hiddenBox {
|
||||
opacity: 0 !important;
|
||||
z-index: 0 !important;
|
||||
}
|
@ -1,6 +1,27 @@
|
||||
var centeredBox = document.getElementById("centeredBox");
|
||||
|
||||
const toggleCenteredBox = () => {
|
||||
centeredBox.classList.toggle('hiddenBox');
|
||||
console.log('toggle center box');
|
||||
let centeredBoxVisibility = true;
|
||||
|
||||
const showCenteredBox = () => {
|
||||
centeredBox.classList.remove('hiddenBox');
|
||||
centeredBoxVisibility = !centeredBoxVisibility;
|
||||
}
|
||||
|
||||
const hideCenteredBox = () => {
|
||||
centeredBox.classList.add('hiddenBox');
|
||||
centeredBoxVisibility = !centeredBoxVisibility;
|
||||
}
|
||||
|
||||
const toggleCenteredBox = () => {
|
||||
|
||||
if (centeredBoxVisibility) {
|
||||
// Hide web menu
|
||||
hideCenteredBox();
|
||||
|
||||
} else {
|
||||
// Show Web menu
|
||||
showCenteredBox();
|
||||
}
|
||||
|
||||
console.log('toggle web menu');
|
||||
}
|
Loading…
Reference in New Issue
Block a user