Image gallery
- Examine the source code to see how the gallery is organized
- Add a click event listener to each thumbnail:
- When you click on a thumbnail, it gets the class
.border
and thedata-id
attribute is read - Use the value of this data attribute to determine a new URL for the large image
- Example:
data-id="1051"
must generatehttps://picsum.photos/id/1051/600/400
- Example:
- When you click on a thumbnail, it gets the class