I am using the FAQ Field module my project which utilizes the jQuery Accordion UI and HTML definition lists, and I am wondering how I can attach an 'active' field to the expanded question. I would like to know so I can show/hide an up/down caret next to each of the questions based on it's active (expanded) state. I am using Drupal 7. Thank you.


This functionality is provided by FAQ Field using the jQuery Accordion UI.

In Structure > Content Types > Your Content type > manage display (admin/structure/types/manage/[your_content_type]/display), if you change your FAQ field display settings from Definition List to Accordion, an up/down caret is shown next to each question.

FAQ Field display options

If you click on the gear icon corresponding to your FAQ Field you can configure which question is active by default, as well as whether the questions are collapsible.

FAQ Field accordion display settings


FAQ Field accordion

The Accordion setting also adds the class ui-state-active to the active question element (an h3) and the class ui-accordion-content-active to the active answer element (a div).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.