Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Is there any way using vanilla JavaScript to achieve the way thumbnails are used here: https://demo.simple-react-lightbox.dev/? As in, when the user clicks on the next/prev button, the thumbnails scroll along, and similarly when clicking on a thumbnail. And also when the picture that opens the lightbox is clicked, the active thumbnail is in view.

(I already know how to make the lightbox itself from here: https://www.w3schools.com/howto/howto_js_lightbox.asp)

Someone basically did this, but used jQuery: https://stackoverflow.com/a/47967474.
I rather not use that unless necessary. I also don't fully understand that code in order to convert it to js.
(View that on desktop view to run the code snippet)

Thank you.

What I have tried:

Not much. I don't know how to do this...
Posted
Updated 10-Jan-22 9:31am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900