Jonathan Grant Jonathan Grant - 1 year ago 70
Javascript Question

jquery for FAQ page

I don't have much experience with jquery so excuse my ignorance. I'm trying to make a FAQ where the answer appears when the question is clicked. Here's some test code. Obviously I'm not doing the jquery right because it's not working.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src=""></script>
<title>Untitled Document</title>



<li class="q">Q1. Question
<li> A. Answer


Answer Source
    $('.question').on('click', function() {        

You wanna something like this if I got you right.