我有这个代码:
<section data-featherlight-gallery="" data-feather-filter="a">
<a class="apt-gallery-d" href="img.png">
<img class="module-img-size" src="img.png" alt="1 Alcoba">
</a>
<a class="apt-gallery-d hidden" href="img.png">
<img class="module-img-size" src="img.png" alt="1 Alcoba">
</a>
</section>
jQuery(document).ready(function() {
jQuery('a.apt-gallery-d').featherlightGallery({
openSpeed: 300,
previousIcon: ' ',
nextIcon: ' ',
variant: 'custom-lightbox-css',
loading: 'Cargando...',
});
})
灯箱打开时,会出现一个 slider ,其中包含默认的灯箱导航,但该导航不太用户友好。你不知道什么时候看到最后一张图片,因为它看起来像是无限循环。另外,如果我只有一张图像,导航无论如何都会出现。
如何更好地控制下一个上一个箭头何时出现?
最佳答案
来自文档:
It sets the classes
'featherlight-first-slide'
and'featherlight-last-slide'
if the current slide is the first and/or last one.
您可以使用它们自定义外观或根据需要禁用上一个和下一个按钮
关于javascript - Featherlight 插件更好的导航,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40300137/