-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
91 lines (69 loc) · 2.55 KB
/
main.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
let mobileMenuBtn = document.getElementById("mobileMenuBtn");
let mobileMenu = document.getElementById("mobileMenu");
let age = 23;
// Burger Menu Utilities
mobileMenuBtn.onclick = () => {
mobileMenuBtn.classList.toggle("is-active");
mobileMenu.classList.toggle("is-active");
}
// Burger Menu Utilities end
// Mobile Menu links
// first dropdown
let dropdownTitleOne = document.getElementById("dropdownTitleOne");
let dropdownOne = document.getElementById("dropdown-one");
dropdownTitleOne.onclick = () => {
dropdownOne.classList.toggle("is-called");
}
// second dropdown
let dropdownTitleTwo = document.getElementById("dropdownTitleTwo");
let dropdownTwo = document.getElementById("dropdown-two");
dropdownTitleTwo.onclick = () => {
dropdownTwo.classList.toggle("is-called");
}
// third dropdown
let dropdownTitleThree = document.getElementById("dropdownTitleThree");
let dropdownThree = document.getElementById("dropdown-three");
dropdownTitleThree.onclick = () => {
dropdownThree.classList.toggle("is-called");
}
// Mobile Menu link End
// BRANDS AUTO SLIDER
let clonedImages = document.querySelector(".brands-slider").cloneNode(true);
document.querySelector(".brands").appendChild(clonedImages);
// BRANDS AUTO SLIDER END
// ---- Feedback Dots Slider
let btnOne = document.getElementById("btn-one");
let btnTwo = document.getElementById("btn-two");
let btnThree = document.getElementById("btn-three");
let btnFour = document.getElementById("btn-four");
let testimonialPusherAgent = document.getElementById("testimonial-one-pusher");
console.log(testimonialPusherAgent);
btnOne.onclick = () => {
testimonialPusherAgent.style.marginLeft = "40%"
btnOne.style.fontWeight = "bold";
btnTwo.style.fontWeight = "normal";
btnThree.style.fontWeight = "normal";
btnFour.style.fontWeight = "normal";
}
btnTwo.onclick = () => {
testimonialPusherAgent.style.marginLeft = "20%"
btnTwo.style.fontWeight = "bold";
btnOne.style.fontWeight = "normal";
btnThree.style.fontWeight = "normal";
btnFour.style.fontWeight = "normal";
}
btnThree.onclick = () => {
testimonialPusherAgent.style.marginLeft = "0%"
btnThree.style.fontWeight = "bold";
btnOne.style.fontWeight = "normal";
btnTwo.style.fontWeight = "normal";
btnFour.style.fontWeight = "normal";
}
btnFour.onclick = () => {
testimonialPusherAgent.style.marginLeft = "-20%"
btnFour.style.fontWeight = "bold";
btnOne.style.fontWeight = "normal";
btnTwo.style.fontWeight = "normal";
btnThree.style.fontWeight = "normal";
}
// ---- Feedback Dots Slider END