js faq
This commit is contained in:
@@ -20,11 +20,11 @@ var questions = document.getElementsByClassName(".field--name-field-question");
|
||||
|
||||
for (let i = 0; i < questions.length; i++) {
|
||||
const question = questions[i]
|
||||
question.addEventListener("click", toggleMenu);
|
||||
question.addEventListener("click", toggleFaq);
|
||||
}
|
||||
|
||||
|
||||
function toggleMenu(event) {
|
||||
function toggleFaq(event) {
|
||||
console.log(event);
|
||||
for (let i = 0; i < answers.length; i++) {
|
||||
const answer = answers[i]
|
||||
|
||||
Reference in New Issue
Block a user