-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
27 lines (20 loc) · 787 Bytes
/
index.js
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
const searchBtn = document.querySelector(".fa-search");
const searchContainer = document.querySelector(".search");
const btn_menu = document.querySelector(".btn_menu");
const navbar = document.querySelector(".navbar");
const btnUser = document.querySelector(".fa-user");
const btnForm = document.querySelector(".container_login");
const btnX = document.querySelector("#btn_close");
btnUser.addEventListener('click', () => {
btnForm.classList.add('active');
});
btnX.addEventListener('click', () => {
btnForm.classList.remove('active');
});
btn_menu.addEventListener("click", () => {
navbar.classList.toggle('navbar_active');
});
searchBtn.addEventListener("click", () => {
searchBtn.classList.toggle('fa-times');
searchContainer.classList.toggle('active');
});