Orit
Active member
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:
Thanks!!
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:
<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>
Thanks!!