Forums

FAQ Manager
jQuery Mod - in case you were interested. (4 posts)

  1. dwcouch
    Member
    Posted 11 months ago #

    I was looking to leverage css for the selected FAQ and close the non-selected FAQ while using the category slug short-code.

    The 'stop()' avoids UI bugs if some-one gets click-happy.

    Great Plug-in!

    faq-collapse.js

    jQuery(document).ready(function () {
    	jQuery(".faq_answer").hide();
    	jQuery(".faq_question").click(function () {
    		jQuery(".faq_answer").not(this).hide().parent().removeClass("currentFaq");
    		jQuery(this).stop().next(".faq_answer").slideToggle(200).parent().addClass("currentFaq");
    	});
    });
  2. norcross
    Member
    Posted 11 months ago #

    Hadn't even thought about folks getting click-happy. I'm getting ready to push out a pretty big update that includes jQuery ajax pagination, so I'll test this along with it to make sure there are no conflicts. Thanks!

  3. norcross
    Member
    Posted 11 months ago #

    Tested your code. It works well, however, it loses the ability to close an individual FAQ if you want to. I'm gonna play with it some more and see about including it in a future release. Thanks again!

  4. dwcouch
    Member
    Posted 9 months ago #

    Funny, I hadn't thought about closing a FAQ once it opened.
    Thanks for the replay, I'm glad I could be of help!

    ~D

Reply

You must log in to post.

About this Plugin

About this Topic