Commit 859b8595 authored by Zhai Zirun's avatar Zhai Zirun

still working on separating script file

parent c05123bf
document.getElementById("custom-button").addEventListener("click", openTab(event, 'custom'));
document.getElementById("load-button").addEventListener("click", openTab(event, 'load'));
function openTab(evt, tabName) {
function openCustomTab() {
var i, content, tablinks;
content = document.getElementsByClassName("content");
......@@ -15,7 +15,25 @@ function openTab(evt, tabName) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
document.getElementById('custom').style.display = "block";
evt.currentTarget.className += " active";
}
function openLoadTab() {
var i, content, tablinks;
content = document.getElementsByClassName("content");
for (i = 0; i < content.length; i++) {
content[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById('load').style.display = "block";
evt.currentTarget.className += " active";
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment