I should start off by saying that if there is a question like this I'm very sorry but I couldn't quite find a definite answer.
I'm quite new to JavaScript but I was wondering how in a function using if statements you could find out if a specific image had been clicked (Image ID's as 1,2 and 3) and then display appropriate text below it that appends to a previous paragraph.
The var's in this (text1 etc.) just have the text in quotations so they're fine, so I was wondering what I could do to change this code so it doesn't keep printing text1 no matter what kind of image I click.
(Although I think this is due to it being read that if an ID is there it just prints it, so that's why text1 is always printed)
Code snipped.