-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
33 lines (23 loc) · 932 Bytes
/
script.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
28
29
30
31
32
33
let searchForm = document.querySelector('.search-form');
document.querySelector('#search-box').onclick = () =>{
searchForm.classList.toggle('active');
userlogin.classList.remove("active");
shoppingcart.classList.remove("active");
}
let shoppingcart= document.querySelector(".shop-box");
document.querySelector("#shopping-box").onclick= () =>{
shoppingcart.classList.toggle("active");
userlogin.classList.remove("active");
searchForm.classList.remove('active');
}
let userlogin=document.querySelector(".login");
document.querySelector("#login-btn").onclick= () =>{
userlogin.classList.toggle("active");
shoppingcart.classList.remove("active");
searchForm.classList.remove('active');
}
window.onscroll= () =>{
userlogin.classList.remove("active");
shoppingcart.classList.remove("active");
searchForm.classList.remove('active');
}