You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
429 B
JavaScript
15 lines
429 B
JavaScript
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";
|
|
}
|
|
});
|