WordPress.org

Ready to get started?Download WordPress

Forums

Q and A FAQ and Knowledge Base for WordPress
[Plugin: Q and A - FAQ Plugin] Making a "Show All" button (2 posts)

  1. mesayre
    Member
    Posted 2 years ago #

    Hey folks,
    I like this plugin a lot, and have it working pretty well with some custom styling. I'd like to make a button on my page that expands or hides all the answers at once. It seems like some kind of jQuery call to execute toggleFade() on all div.faq-answer would do it, but I can't get it to work. Sorry, I'm a jQuery noob, so I'm probably just not calling it right. Here's what I'm doing:

    function toggleAll() {
    $( 'div.faq-answer').toggleFade();
    }

    And then calling the function from an onclick() event on a link. Seems like that should do it, but I'm clearly missing something.

    I'm also trying to do this the "right" way by enqueuing a custom JS file so it doesn't get blown away by the next update, btw. Any help would be greatly appreciated.

    Thanks!
    Mike

    http://wordpress.org/extend/plugins/q-and-a/

  2. b-summers
    Member
    Posted 2 years ago #

    I am also looking to implicate this functionality...any one have any suggestions?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags