Image Popup

In this example, we use CSS to create a Popup (dialog box) that is hidden by default.

We use JavaScript to trigger the Popup and to display the current image inside the Popup when it is clicked on. Also note that we use the value from the image's "alt" attribute as an image caption text inside the Popup.

Snow
Developers Answer