This is a simple light weight jQuery plugin to implement accordion behavior for FAQs. All answers are hidden except first one. When question is clicked answer is shown. No custom css is needed, use your existing css. Add the “jquery.faq.js” between head tag of your FAQs page.
<script src=”jquery.faq.js” type=”text/javascript”></script> <script type=”text/javascript”>
<script type=”text/javascript”> $(document).ready(function() { jQuery(‘.questions’).faq(); }); </script>
The faqs should look like this
Question 1
Lorem ipsum dolor sit amet consectetuer adipiscing Cum eu sed Vestibulum. Condimentum malesuada faucibus id Nam Curabitur nibh a arcu Phasellus wisi. Ac at ut nibh sollicitudin nunc mauris.
Question 2
Nulla nec mauris et Vivamus vitae felis id est turpis vitae. Nibh sollicitudin at fringilla adipiscing ante et Maecenas nibh semper quis.
Question 3
Quis et In ut justo auctor id wisi quis Donec pede. Ipsum Suspendisse sapien pretium id laoreet nulla Mauris hac ac nulla. Wisi tellus Lorem porta.
Click here to download