kalyax
3 years ago
3 changed files with 61 additions and 8 deletions
@ -0,0 +1,21 @@ |
|||
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"); |
|||
} |
|||
} |
Loading…
Reference in new issue