31 lines
919 B
JavaScript
31 lines
919 B
JavaScript
|
// GET ELEMENTS TO INTERACT WITH
|
||
|
// main menu
|
||
|
let audioBut = document.getElementById('audioButton')
|
||
|
let otherBut = document.getElementById('otherButton')
|
||
|
|
||
|
// GET DOMs TO ALTER
|
||
|
let audioSection = document.getElementById('audioSection')
|
||
|
let otherSection = document.getElementById('otherSection')
|
||
|
|
||
|
// MAIN MENU
|
||
|
audioBut.addEventListener("click", () => {
|
||
|
if (audioSection) {
|
||
|
otherSection.style.visibility = "hidden"
|
||
|
otherSection.style.display = "none"
|
||
|
audioSection.style.visibility = "visible"
|
||
|
audioSection.style.display = "inherit"
|
||
|
} else {
|
||
|
console.log('No section')
|
||
|
}
|
||
|
})
|
||
|
|
||
|
otherBut.addEventListener("click", () => {
|
||
|
if (otherSection) {
|
||
|
audioSection.style.visibility = "hidden"
|
||
|
audioSection.style.display = "none"
|
||
|
otherSection.style.visibility = "visible"
|
||
|
otherSection.style.display = "inherit"
|
||
|
} else {
|
||
|
console.log('No section')
|
||
|
}
|
||
|
})
|