I was going through ashbotandsparki quiz. ( Thanks ahsbotandsparki ! )
I thought I would help out a bit. The updated code can be found in my comment on the above mentioned post. You can also find it here.
What I basically did was:
- Put all the questions, options, answers, hints in seperate arrays.
- When the user starts the quiz, I take the first question, the first set of options.
- If the option selected by the user is the same as the first answer from the array, I proceed loading the next question
- Else, I show the first hint and start again.
- I have used jquery a bit.