Answer the question
In order to leave comments, you need to log in
How to apply UIkit.lightbox to links with a specific class?
Foreword: Joomla had a separate plugin for lightbox. But the template on UIkit3. Recently, I began to study UIkit, and saw a good lightbox there. I decided to get rid of the plugin and implement the lightbox built into UIkit3.
The documentation says
<div uk-lightbox>
<a href="image.jpg" data-caption="Caption"></a>
</div>
Answer the question
In order to leave comments, you need to log in
if still relevant, I had a similar situation -
a list of photos and links under them, you only need to display the photos in the lightbox.
It turns out to be easy to do this, you need to set the uk-lightbox option "toggle: css-selector", where css-selector can be any tag or the same a
with a specific class:
<div uk-lightbox="toggle: a.lbox">
<div class="item">
<a class="lbox" href="img.jpg">
<img src="img.jpg">
</a>
<a href="item.php">Title item</a>
</div><!-- ./item -->
...
</div>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question