site-perso-poly/static/js/utils.js
Djalim Simaila 5ddb388348 feat(html, css, js): refactor HTML structure to improve semantics and accessibility, add header and footer to all pages, and enhance styling for better user experience
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
2025-02-22 18:39:44 +01:00

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")
? "▲"
: "▼";
}