[jQuery] reveal/hide toggle
<html>
<body>
Hi folks,
My level of expertise must be very low as the jquery tutorials on this
and other sites haven't helped me find a solution to the following
question:
I have a page that dynamically delivers FAQs from a database.
I want to have the question shown, and when a link (on the question) is
clicked, the answer will slide down (and when clicked again, the answer
will slide up).
I can do this with jquery if I know in advance how many FAQs are coming
so that I can hardcode the necessary ids. What I'm sure I must be
able to do however, is have a function that will run regardless of the
number of FAQs that are generated. e.g.
<tt><p id="faq1">How do I login?
<p id="ans1">First you.....
<p id="faq2">How do I contact you?
<p id="ans2">The best way is...
</tt>:
:
<tt><p id="faqz">blah blah?
<p id="ansz">abske dna...
</tt>Can someone point me in the right direction - either to an existing
resource or a code example.
Thanks,
Bruce </body>
</html>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/