-
Notifications
You must be signed in to change notification settings - Fork 0
/
growth.js
26 lines (19 loc) · 903 Bytes
/
growth.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
document.addEventListener("DOMContentLoaded",()=>{
const faqContainer = document.querySelector(".faq-content")
faqContainer.addEventListener('click',(e)=>{
const groupHeader = e.target.closest('.faq-group-header')
if(!groupHeader) return
const group = groupHeader.parentElement
const groupBody = group.querySelector('.faq-group-body')
const icon = groupHeader.querySelector('i')
icon.classList.toggle('fa-plus')
icon.classList.toggle('fa-minus')
// visibility of body
groupBody.classList.toggle('open')
})
})
document.addEventListener('DOMContentLoaded',()=>{
const hamburgerButton = document.querySelector('.hamburger-button')
const mobileMenu = document.querySelector('.mobile-menu')
hamburgerButton.addEventListener('click', () => mobileMenu.classList.toggle('active'))
})