sanic/static/index.js
2023-11-06 22:38:39 +01:00

13 lines
378 B
JavaScript

function switchTab(event, tabname) {
for (let tab in document.getElementsByClassName("tab")) {
tab.style.display = "none";
}
for (let button in document.getElementsByClassName("tablink")) {
button.className = button.className.replace(" active", "");
}
document.getElementById(tabname).style.display = "block";
event.currentTarget.className += " active";
}