jQuery_FAQ_page

jQuery_FAQ_page
0

#1

I’m a jQuery beginner and i created a FAQ page.
Code:
index.php

FAQ

1. Question 1

Details1

2. Question 2

Details 2

3. Question 3

Details 3

**script1.js** $("div").children("p").hide(); $(document).ready(function () { $("h1").click(function () { $("div").children("p").hide(); $(this).next("p").show(); }); } ); Is this correct? Is it look awkward? Any other coding? Help please.

#2

When you want to show code in a post, you need to use 3 backticks on the line before and after the code you paste. See this page for more information. Once you get your code properly formatted, we can answer your question.