-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
27 lines (22 loc) · 912 Bytes
/
Copy pathscript.js
File metadata and controls
27 lines (22 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
document.addEventListener("DOMContentLoaded", function () {
const signInBox = document.querySelector(".auth-box.signin");
const signUpBox = document.querySelector(".auth-box.signup");
const signInBtn = document.getElementById("show-signin");
const signUpBtn = document.getElementById("show-signup");
// Default to Sign In
showSignIn();
signInBtn.addEventListener("click", showSignIn);
signUpBtn.addEventListener("click", showSignUp);
function showSignIn() {
signInBox.style.display = "block";
signUpBox.style.display = "none";
signInBtn.classList.add("active");
signUpBtn.classList.remove("active");
}
function showSignUp() {
signInBox.style.display = "none";
signUpBox.style.display = "block";
signUpBtn.classList.add("active");
signInBtn.classList.remove("active");
}
});