Modal response to image click

This is probably obvious to %99 of the readers here, but I can’t figure out how to do it.

I just want to bring up a modal in response to a mouse click on an image. Any pointers to how to do this would be welcome.

What theme or framework? UIkit?

Ulkit, yes, thanks.

I suspect it can be done using a stack, but try…

  1. Give the modal a class ID (default is “my-modal”)
  2. Click advanced on the image stack.
  3. Add this to the custom css box uk-toggle="target: #IDname"

Change IDname to the ID toy gave the modal.

That should work.

1 Like

Ya, just quickly tried that method. Works as expected.

Works perfectly. Thanks!