sanic/static/index.js

13 lines
378 B
JavaScript
Raw Normal View History

2023-11-06 22:38:39 +01:00
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";
}