How to open lightbox upon an image click

  • Profile Image
    anandrajog
    Asked on June 16, 2016 at 07:06 PM
    I want the user to click on a picture before the lightbox is opened. Can we do it?
  • Profile Image
    Mike
    Answered on June 16, 2016 at 07:20 PM

    The lightbox code comes with a link, and you can place your image html tag directly within that link.

    Example:

    <a class="btn lightbox-XXXXXXXXXXXX" style="margin-top: 16px">

    <img src="https://your-image-url.com/image.png" />

    </a>

    Please give it a try and let us know if you need any further assistance.