Commit b47fc125 authored by MohammadAli Keshavarz's avatar MohammadAli Keshavarz

learning classlist and toggle

parent 3753f7ec
......@@ -45,6 +45,8 @@ document.querySelector(".btn-roll").addEventListener("click", function() {
activePlayer = 0;
document.querySelector("#current-1").textContent = 0;
}
document.querySelector('.player-0-panel').classList.toggle('active');
document.querySelector('.player-1-panel').classList.toggle('active');
}
document.querySelector("#current-" + activePlayer).textContent = roundScore;
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment