Support » Plugin: FAQ Manager » Add class to indicate "expanded" on faq question

  • Resolved ijacobs


    Hi again,

    I would like to style faq questions that have been ‘expanded’ differently than those that are ‘collapsed.’ Currently you are changing display to “block” upon expansion. It would also be helpful to add a class value at the level of the single_faq to indicate that it is currently open. That will allow me, for instance, to use “open” and “collapsed” icons at the start of the questions.

    Thus: <div class=”single_faq open”> or something similar when in the expanded state. Thanks!

    Another note: to make the FAQ questions keyboard navigable, I am doing this in the code of faq-manager (1.11) on line 78:

    $displayfaq .= ‘<‘.$faq_htype.’ id=”‘.$faq_slug.'” c\

    That may not be the best way to make the code keyboard navigable in HTML5, but I’ve not had time to research a better way.


Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andrew Norcross


    I’m still doing some digging into the best way to handle keyboard navigation. The display:block gets added automatically by the jQuery expand function. I’m not nearly as proficient in jQuery / javascript as I am with PHP, but I’ll see if there’s a way to include a class to indicate that it’s indeed expanded.

    Would also really like to see someway to show the question as being expanded. Client wants to show a different icon next to the question based on if the answer is showing or not.

    Great plugin, appreciate the support you provide. Also, looking forward to seeing you speak this Sunday at WordCamp Boston 🙂

    Plugin Author Andrew Norcross


    I’m still working on this. I’ve got a working model that I can attach to either the H tag or the text within, but not the outside single_faq, since all the jQuery functionality is contained within that block and not outside of it.

    Any update on getting the class added to the expanded question?

    It could be anywhere, so long as it can be targeted with css. Lovely plugin BTW.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Add class to indicate "expanded" on faq question’ is closed to new replies.