I am doing a project on a responsive quiz that enables young children to do their quizzes. Project I am working on is spelling bee.
I am able to collect the score, display the questions and the user is able to click to next question. What I need now is to validate the answers for each question. For example, I can have a hidden image on the page, if the user answers the question correctly, the "tick" image will appear. However, if they get it wrong, the "x" image will appear.
I have the general idea on how to do it but I have no idea on how the codes are going to be. Can anyone help me by providing some codes for me to work with?
depends on how you validate your question. If you are doing it with php then you can simply echo an image on the right place. If you doing it with JS you should have an empty div in the considered location, and add innerHtml with js.
getElementById(#divWherePictureshouldbe).innerHTML = "<img src="sourceToTickOrX" />