BRANCH: Torrent with Vue and pure JS.
This commit is contained in:
13
public/static/js/tabControl.js
Normal file
13
public/static/js/tabControl.js
Normal file
@@ -0,0 +1,13 @@
|
||||
function openTab(evt, tabName) {
|
||||
var i, x, tablinks;
|
||||
x = document.getElementsByClassName("tab");
|
||||
for (i = 0; i < x.length; i++) {
|
||||
x[i].style.display = "none";
|
||||
}
|
||||
tablinks = document.getElementsByClassName("tablink");
|
||||
for (i = 0; i < x.length; i++) {
|
||||
tablinks[i].className = tablinks[i].className.replace(" activeButton", "");
|
||||
}
|
||||
document.getElementById(tabName).style.display = "block";
|
||||
evt.currentTarget.className += " activeButton";
|
||||
}
|
Reference in New Issue
Block a user