That's great! I'd definitely settle for that! I was just wondering if there might be a way to show the "correct tick" next to the actual sentence that is correct "Mary, who is English, was born in London" , as opposed to being next to the question? Thanks!

dubman
—
2014-01-28T21:03:37Z —
#4

dubman said:

That's great! I'd definitely settle for that! I was just wondering if there might be a way to show the "correct tick" next to the actual sentence that is correct "Mary, who is English, was born in London" , as opposed to being next to the question? Thanks!

Would the following be the correct way to extend the script to more than one question?

The idea being that if someone clicks "Results" without answering any questions, a question mark image would show next to all the questions, instead of the incorrect mark "x", which shows at present. How would I go about this? Thanks.

Pullo
—
2014-01-30T19:20:08Z —
#7

Well the trigger for someone not having answered anything is this:

if(answer.length === 0){
// This code will fire for every question where the user has not selected anything
}

I would hook into that and append the question mark as desired.

dubman
—
2014-01-30T22:08:50Z —
#8

Ok, I got it working - hopefully correctly ;o) by adding the following:

I have renamed the function clearAnswers to clearAnswerImages as a clear indication of what it does.

We also have quite a lot of duplicated code in our "markWhatever" functions.As a second step, let's turn the three functions into one and pass it two parameters: the element to mark, the way to mark it.