-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
20 lines (17 loc) · 775 Bytes
/
script.js
File metadata and controls
20 lines (17 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const container = document.querySelector(".container");
const joinBtn = document.querySelector(".navigation a:nth-child(3)");
const homeBtn = document.querySelector(".navigation a:nth-child(2)");
const loginBtn = document.querySelector(".contact p a");
const contactBtn = document.querySelector(".contact-btn:nth-child(2)");
joinBtn.addEventListener("click", () => {
container.classList.add("change");
});
homeBtn.addEventListener("click", () => {
container.classList.remove("change");
});
loginBtn.addEventListener("click", () => {
container.classList.toggle("hide")
? (loginBtn.textContent = "Sign Up") && (contactBtn.textContent = "Log In")
: (loginBtn.textContent = "Log In") &&
(contactBtn.textContent = "Create Account");
});