In this project, we create a pop-up image (usually called a Lightbox) when an image is clicked on your page with plain HTML, CSS, and Javascript. In this second part, we’ll focus on the Javascript.
In this video:
• ternary conditionals
• switch statements
• prevent default on keydown events
• stopPropogation on click events
• converting a node list to an array
• setTimeout
• Using custom data attributes and more!
Comment with questions or suggestions.
First part:
https://youtu.be/K64-o0JgO-s
-- Other Lightbox Videos
- Beginner Lightbox:
https://youtu.be/v9nq8KXiPFo
- Autorotating Image Gallery:
https://youtu.be/CkEfFqsogjA
- Lightbox with Magnifier:
https://youtu.be/SfFWr682-m8