Tag Archives: toggle

Show/hide function for questions and answers

Here’s a neat little script that allows a question and answer type format, where the questions are all listed as links, and clicking on one toggles the visibility of the corresponding answer. $(“p”).hide(); $(“a”).click(function () { $(this).next(“p:first”).slideToggle(“fast”); }); Here’s a … Continue reading