I have the following code which prompts the user to select an image:
<div id="frame1" class = "quizFrame quizFrame1">
<p>Which image do you identify with?</p>
<img class = "quizImg" src="images/person1.jpg" alt="" onclick ="ShowNext();" >
<img class = "quizImg" src="images/person2.jpg" alt="" onclick = "ShowNext();">
<img class = "quizImg"src="images/person3.jpg" alt="" onclick = "ShowNext();">
<img class = "quizImg" src="images/person4.jpg" alt="" onclick = "ShowNext();">
</div>
Upon clicking the image I would like to determine which image was clicked.
Is there a way to retrieve the index of the image somehow ? (for instance if person1 was clicked the index would be 0 or 1)?
I know I can assign IDs to each image but would like to know if there is an easier route.