Opening an image in lightbox

Status
This content is read-only, or is not open for further replies.

Orit

Guest
offline
Hello :)
Is there a way to make an image in a template open in lightbox, when clicked?

This is my code. It opens the image in a new tab, not in a lightbox:

HTML:

Code:
<a href="{{ link('media/full', $mediaItem) }}" style="cursor: pointer;"
    class="js-lbImage"
    target="_blank"
    data-src="{$mediaItem.lightbox_src}"
    data-type="{$mediaItem.lightbox_type}">               
    <img class="xfmg-image" src="{{ link('media/full', $mediaItem)}}" width="100%" data-zoom-target="1"/>
</a>
...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom