I created an image Popup system for my website. I have converted that into a code pen here →
Issue: it is pulling by ID, but one one page one ID can do this only for one image that comes first. what if there are more than one images, this code pen →
The second image is not clickable.
what is the permanent fix irrespective of number of images.
You need to use classes for the images instead of ids and then you can loop through them all. My JS is pretty basic but something like this forked demo of yours.