panels wip
parent
055b47e92b
commit
101c1cbd45
@ -1,14 +0,0 @@
|
||||
const showInfo = document.getElementById("show-info");
|
||||
const infoPanel = document.getElementById("info-panel");
|
||||
|
||||
showInfo.addEventListener("click", (e) => {
|
||||
if (infoPanel.classList.contains("active")) {
|
||||
infoPanel.classList.remove("active");
|
||||
showInfo.classList.remove("active");
|
||||
showInfo.innerHTML = "?";
|
||||
} else {
|
||||
infoPanel.classList.add("active");
|
||||
showInfo.classList.add("active");
|
||||
showInfo.innerHTML = "X";
|
||||
}
|
||||
});
|
@ -0,0 +1,19 @@
|
||||
const showInfo = document.getElementById("show-info");
|
||||
const infoPanel = document.getElementById("info-panel");
|
||||
|
||||
showInfo.addEventListener("click", (e) => {
|
||||
infoPanel.classList.add("active");
|
||||
infoPanel.querySelector(".close").addEventListener("click", (e) => {
|
||||
infoPanel.classList.remove("active");
|
||||
});
|
||||
});
|
||||
|
||||
const showTranscription = document.getElementById("show-transcription");
|
||||
const transcriptionPanel = document.getElementById("transcription-panel");
|
||||
|
||||
showTranscription.addEventListener("click", (e) => {
|
||||
transcriptionPanel.classList.add("active");
|
||||
transcriptionPanel.querySelector(".close").addEventListener("click", (e) => {
|
||||
transcriptionPanel.classList.remove("active");
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue