Skip to content

Commit 08a57f1

Browse files
committed
Add toggle button
1 parent d32561c commit 08a57f1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Source-Code/FAQApplication/script.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const faqs = document.querySelectorAll('.faq');
2+
3+
faqs.forEach((faq) => {
4+
faq.addEventListener('click', () => {
5+
faq.classList.toggle('active');
6+
});
7+
});

0 commit comments

Comments
 (0)