How to target different images on click to be viewed in large on a same div? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to target different images on click to be viewed in large on a same div?

I have multiple images on a webpage. i want to view each image on click in a condition that all will open in a same hidden div which will show on click..it should only show the image which I click.. I was trying it with php and js.... in PHP it is working on a different page using $_get[] method, and by js I have no idea how to do that..

21st Jun 2018, 10:46 PM
Prakash
Prakash - avatar
1 Answer
0
You could use the onlick event and loop through the file names to get the image that is to pop out
21st Jun 2018, 10:48 PM
Peter Claver
Peter Claver - avatar