partirdezero/staticfiles/js/functions.js
2025-09-12 11:07:53 +02:00

15 lines
No EOL
521 B
JavaScript

function hide(id) {
let htmlChange = document.getElementById('show-' + id);
htmlChange.style.display = "none";
htmlChange.id = `hide-${id}`;
let buttonChange = document.getElementById(id);
buttonChange.onclick = function() { show(id); };
}
function show(id) {
let htmlChange = document.getElementById('hide-' + id);
htmlChange.style.display = "block";
htmlChange.id = `show-${id}`;
let buttonChange = document.getElementById(id);
buttonChange.onclick = function() { hide(id); };
}