2022-11-09 14:35:45 +01:00
|
|
|
function openTab(event, tabName) {
|
|
|
|
var i, tabcontent, tablinks;
|
|
|
|
|
|
|
|
// Get all elements with class="tabcontent" and hide them
|
|
|
|
tabcontent = document.getElementsByClassName("tabcontent");
|
|
|
|
for (i = 0; i < tabcontent.length; i++) {
|
|
|
|
tabcontent[i].style.display = "none";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get all elements with class="tablinks" and remove the class "active"
|
|
|
|
tablinks = document.getElementsByClassName("tablinks");
|
|
|
|
for (i = 0; i < tablinks.length; i++) {
|
|
|
|
tablinks[i].className = tablinks[i].className.replace(" active", "");
|
|
|
|
}
|
|
|
|
|
|
|
|
// Show the current tab, and add an "active" class to the button that opened the tab
|
|
|
|
document.getElementById(tabName).style.display = "block";
|
2023-01-16 13:30:43 +01:00
|
|
|
event.currentTarget.className += " active";
|
|
|
|
}
|
|
|
|
|
|
|
|
function refreshPage() {
|
|
|
|
window.location.reload();
|
|
|
|
}
|