16 lines
448 B
JavaScript
16 lines
448 B
JavaScript
let faqLink = document.querySelectorAll('.question');
|
|
|
|
faqLink.forEach(function(link) {
|
|
link.addEventListener('click', function() {
|
|
let faqCont = this.nextElementSibling;
|
|
|
|
if (faqCont.style.display === 'block') {
|
|
faqCont.style.display = 'none';
|
|
this.classList.remove('active');
|
|
} else {
|
|
faqCont.style.display = 'block';
|
|
this.classList.add('active');
|
|
}
|
|
});
|
|
});
|