I have used the code to add Modal Images from the site and it worked perfect.
But when i tried to add more image to my gallery and apply the same code. it gets stuck. (am not good with JavaScript), my second image does not trigger the class: modal.
I have attached the original code.
I would be grateful if you could help me with the code to add one more image: (Eg. 2nd Image file name: img_snow2.jpg)
Modal Images - Adding more images
in General
Posted
Hi! I am Xavier
I have used the code to add Modal Images from the site and it worked perfect.
But when i tried to add more image to my gallery and apply the same code. it gets stuck. (am not good with JavaScript), my second image does not trigger the class: modal.
I have attached the original code.
I would be grateful if you could help me with the code to add one more image: (Eg. 2nd Image file name: img_snow2.jpg)
File has been saved to: https://www.w3schools.com/code/tryit.asp?filename=GN3UOEWNQKAR