-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscript.js
More file actions
21 lines (18 loc) · 779 Bytes
/
script.js
File metadata and controls
21 lines (18 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
document.addEventListener("DOMContentLoaded", function () {
const signUpButton = document.getElementById("signUpButton");
const signInButton = document.getElementById("signInButton");
const signInForm = document.getElementById("signIn");
const signUpForm = document.getElementById("signup");
if (signUpButton && signInButton && signInForm && signUpForm) {
signUpButton.addEventListener("click", function () {
signInForm.style.display = "none";
signUpForm.style.display = "block";
});
signInButton.addEventListener("click", function () {
signInForm.style.display = "block";
signUpForm.style.display = "none";
});
} else {
console.error("One or more elements are missing.");
}
});