You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
877 B
21 lines
877 B
3 years ago
|
let current = "login";
|
||
|
|
||
|
function switchPanel(from){
|
||
|
if(from === current) return;
|
||
|
if(from === "login"){
|
||
|
document.getElementsByClassName("login")[0].style.display = "block";
|
||
|
document.getElementsByClassName("register")[0].style.display = "none";
|
||
|
current = "login";
|
||
|
|
||
|
document.getElementsByClassName("button-login")[0].classList.add("active");
|
||
|
document.getElementsByClassName("button-register")[0].classList.remove("active");
|
||
|
}
|
||
|
else{
|
||
|
document.getElementsByClassName("login")[0].style.display = "none";
|
||
|
document.getElementsByClassName("register")[0].style.display = "block";
|
||
|
current = "register";
|
||
|
|
||
|
document.getElementsByClassName("button-login")[0].classList.remove("active");
|
||
|
document.getElementsByClassName("button-register")[0].classList.add("active");
|
||
|
}
|
||
|
}
|