-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
44 lines (30 loc) · 1.63 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
window.onload = function(){
// Mobile Menu
let mobileMenu = document.querySelector("#mobileMenu");
let menuButton = document.querySelector("#menuButton");
let closeButton = document.querySelector("#closeButton");
menuButton.addEventListener('click', function(event){
mobileMenu.classList.toggle('d-block');
document.body.style.backgroundColor = "rgba(0,0,0,0.4)";
});
closeButton.addEventListener('click', function(event){
mobileMenu.classList.remove("d-block");
document.body.style.backgroundColor = "white";
});
// Dropdown toggle for features section
let featuresDropdownToggle = document.querySelector('.dropdown-toggle.features');
let featuresdropdownContent = document.querySelector('.dropdown-content.features');
let featuresdropdownToggleIcon = document.querySelector('.dropdown-toggle.features>.dropdown-toggle-icon>i');
featuresDropdownToggle.addEventListener('click', function(event){
featuresdropdownContent.classList.toggle('d-block');
featuresdropdownToggleIcon.classList.toggle('bi-chevron-up');
});
// Dropdown toggle for company section
let companyDropdownToggle = document.querySelector('.dropdown-toggle.company');
let companydropdownContent = document.querySelector('.dropdown-content.company');
let companyDropdownToggleIcon = document.querySelector('.dropdown-toggle.company>.dropdown-toggle-icon>i');
companyDropdownToggle.addEventListener('click', function(event){
companydropdownContent.classList.toggle('d-block');
companyDropdownToggleIcon.classList.toggle('bi-chevron-up');
});
}