I have a question regarding jQuery show/hide.
At the moment, my page opens and my FAQs have all the answers showing. When I click on any of the questions, all the answers hide.
What adjustments can I make that will have my page open to only showing the questions (this is my FAQ page) and when a visitor clicks on a question, only that answer shows? Right now all answers show when I click a question.
thank you for the help,
Randy
My jquery code is this:
And a bit of my html code is this:Code:$(document).ready(function () { $('h3').click(function() { if ( $('li p.faqs_answers').is(':visible')){ $('li p.faqs_answers').hide(1000); }else { $('li p.faqs_answers').show(1000); } }); });
Code:<div id="faqscontactaboutservices"> <h3 class="faqs_specific">Frequently Asked Questions</h3> <ul> <li> <div class="faqs_specific"><h3> What areas do you serve?</h3></div> <p class="faqs_answers">answer goes here</p> </li> <li> <div class="faqs_specific"><h3> What forms of payment do you accept?</h3></div> <p class="faqs_answers">We accept cash, check, debit card, and credit card.</p> </li> ...


Reply With Quote
Bookmarks