feat(js): implement utility functions for hiding and showing elements, and add event listeners for better interactivity feat(js): create a new roulette game in TP6 with random number generation and qualifying number logic fix(css): update styles for consistency and responsiveness across different screen sizes
16 lines
449 B
JavaScript
16 lines
449 B
JavaScript
function hide(element) {
|
|
element.classList.add("hidden");
|
|
}
|
|
function unhide(element) {
|
|
element.classList.remove("hidden");
|
|
}
|
|
|
|
function toggle_all_header_links() {
|
|
const headerLinks = document.querySelector("header > .links");
|
|
const button_link = document.querySelector("header > button");
|
|
headerLinks.classList.toggle("display_links");
|
|
button_link.textContent = headerLinks.classList.contains("display_links")
|
|
? "▲"
|
|
: "▼";
|
|
}
|