jQuery Mod – in case you were interested.
-
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"); }); });
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘jQuery Mod – in case you were interested.’ is closed to new replies.