Question

I'm having trouble using Fancybox on my website.

These are two (out of 9) of my divs, with different images in it. The thing is, whenever I click on any of the images, it shows the same image everytime. So when I click on the 2nd image, it shows the first image, just like all of the other divs.

<a id="single_3" href="Foto's/symposium1_groot.png" title="Test">
<div id="symposium1"> <img src="Foto's/symposium1.jpg" alt="" /></div></a>
</a>

<a id="single_3" href="Foto's/symposium2_groot.png" title="Test">
<div id="symposium2"> <img src="Foto's/symposium2.jpg" alt="" /></div></a>
Was it helpful?

Solution

You need to make ids unique. Also having 2 closing </a> tags for the first block probably isn't good for you.

Try:

<a id="single_3" href="Foto's/symposium1_groot.png" title="Test">
    <div id="symposium1"> <img src="Foto's/symposium1.jpg" alt="" /></div>
</a>

<a id="single_4" href="Foto's/symposium2_groot.png" title="Test">
    <div id="symposium2"> <img src="Foto's/symposium2.jpg" alt="" /></div>
</a>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top