Support » Plugin: Q and A FAQ and Knowledge Base for WordPress » Active or current class

  • Hi, I have just come across your nice plugin. It does exactly what I was looking for however I think it would be even nicer if it could detect the opened accordion and add to its toggle link an active class name. This way we can style it the way we want.
    Do you think it is easy to be done.
    Thanks a lot in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I would also like this ability.

    Anyone know how this could be accomplished? I’ve tried a few things with jQuery but my knowledge with jQuery is limited.

    Thanks in advance.

    Hi guys,

    i just needed this function also for one of my project, here is my quick solution :

    A bit off css
    `a {
    background: transparent url(img/sprites.png) -50px 0 no-repeat;
    padding-left: 25px;
    &.active {
    background-position-y: -26px;

    a bit of javascript :

    if ($('.faq-list').length >0) {
                $('').on('click', function(event) {

    Hope that help,



    Thank you. The code worked perfectly.

    I had to make sure “Accordion behavior” was unchecked in the admin area because when the plugin automatically closes an FAQ, it kept the active class appended.

    Thanks again for the code!!

    no problem 🙂

    actually, a better code will be this one :

    $('').on('click', function(event) {
                    if (!$(this).hasClass('active')) {

    to take in account the case where there is only one category and the case where the user is clicking on an open category.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Active or current class’ is closed to new replies.