Hi,
I'm building a script dynamically to make a list of faqs with answers that slide out when the question is clicked. Nothing happens on click. I modeled this after the notes here:
Here's an example of one of the results. Script and html below. Any insight would be helpful.
Thanks.
- $("#faq_4").click(function() {
- $("answer_4").slideDown('slow', function() {
- // answer revealed
- });
- });
- <!-- corresponding html -->
- <div id='faq_4'>
- this is the question
- </div>
- <div id='answer_4' style='display:none;'>
- this is the answer
- </div>