I have a lightbox that I built from a tutorial and am currently tweaking. When the user clicks on the thumbnail of an image that has been sold, the image is supposed to open up with a "sold" sign on top. What is happening instead is that it the sold sign is appearing on every other image, whether or not it's sold.
I've uploaded the experimental HTML file so as not to disrupt the working site:
. The first three images should NOT show the sign; the rest have the "sold" class.
And here is the script: www.brettkaufman.com/mfLightbox/js/EXP.js
I created a variable "linkClass"; it's value gets set on line 53. I added an alert on line 102 just so I could see whether it was updating the linkClass value (it is). I put my IF statement on lines 103-105.
What is my mistake and how can I fix it?