-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathscript.js
52 lines (49 loc) · 1.45 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
let searchForm=document.querySelector('.search-form');
document.querySelector('#search-btn').onclick=()=>{
searchForm.classList.toggle('active');
Menu.classList.remove('active');
ShoppingCart.classList.remove('active');
Login.classList.remove('active');
}
let ShoppingCart=document.querySelector('.shopping-cart');
document.querySelector('#cart-btn').onclick=()=>{
ShoppingCart.classList.toggle('active');
Menu.classList.remove('active');
searchForm.classList.remove('active');
Login.classList.remove('active');
}
let Login=document.querySelector('.login-form');
document.querySelector('#login-btn').onclick=()=>{
Login.classList.toggle('active');
Menu.classList.remove('active');
searchForm.classList.remove('active');
ShoppingCart.classList.remove('active');
}
let Menu=document.querySelector('.navbar');
document.querySelector('#menu-btn').onclick=()=>{
Menu.classList.toggle('active');
searchForm.classList.remove('active');
ShoppingCart.classList.remove('active');
Login.classList.remove('active');
}
window.onscroll=()=>{
Menu.classList.remove('active');
searchForm.classList.remove('active');
ShoppingCart.classList.remove('active');
Login.classList.remove('active');
}
var swiper = new Swiper(".product-slider", {
loop:true,
spaceBetween: 20,
breakpoints: {
0: {
slidesPerView: 1,
},
750: {
slidesPerView: 2,
},
1024: {
slidesPerView: 3,
},
},
});