I love jQuery like this:
I love jQuery like this:
$(".question").click(function(){ $(this).next(".answer").toggle(); });
When you click on a question, show the next answer.
When you click on the question again, hide the answer.
And my markup stays clean:
<p class="question">Does this cost anything?</p>
<p class="answer">No, bodybuggTweet is absolutely free.</p>
That pleases me.