mirror of
https://github.com/modmii/modmii.github.io.git
synced 2024-11-15 04:45:12 +01:00
27 lines
915 B
Plaintext
27 lines
915 B
Plaintext
|
|
<script>
|
|
function openTab(tabGroup, tabName) {
|
|
let tabcontent = document.getElementsByClassName(tabGroup);
|
|
let tablinks = document.getElementsByClassName("tablinks");
|
|
|
|
let element;
|
|
|
|
for (element of tabcontent) {
|
|
element.style.display = "none";
|
|
}
|
|
|
|
for (element of tablinks) {
|
|
element.className = element.className.replace("btn--primary", "btn--info");
|
|
if (!element.className.includes('btn--info'))
|
|
element.className += " btn--info";
|
|
}
|
|
|
|
document.getElementById(tabName).style.display = "block";
|
|
event.currentTarget.className = event.currentTarget.className.replace("btn--info", "btn--primary");
|
|
}
|
|
|
|
// Get the element with id="defaultOpen" and click on it
|
|
//document.getElementById("defaultOpen2").click();
|
|
document.getElementById("defaultOpen").click();
|
|
</script>
|