Javascript Lightbox Help

Hello everyone,

Im a student at the university in The Netherlands and i want to implement
a friends self written Lightbox script into my website.

Now, i am still very basic with Javascript and i can’t seem to call my 5 images into my var of the script.

This is the code of the Lightbox script. So basically what it does, it only gives 1 image the right to turn into a lightbox but ignores the 4 other pictures, even though they all have the same img class in the aside section. So i really want it that all my 5 pictures can be used with the script instead of only one, after searching for a long time, i still didn’t found anything yet.

This is the example code of my Html code & my Img classes.

The html code of Lightbox
image

If you create a jsbin of your code, it would make it much easier to help.

Without having the code to play around with (images don’t help much with that), I would like to suggest looking at this bit:

Here you’re only assigning to the variables the first element in the array of class names. That’s what the [0] part at the end is doing.

Really pleased with your reply!

I hope this helps, i create a similar situation. I have sent it to your inbox.

Thanks in advance

It’s also worth mentioning that there are many different solutions available to create this effect already: