javascript - Featherlight 插件更好的导航

标签 javascript jquery featherlight.js

我有这个代码:

<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 ,其中包含默认的灯箱导航,但该导航不太用户友好。你不知道什么时候看到最后一张图片,因为它看起来像是无限循环。另外,如果我只有一张图像,导航无论如何都会出现。

如何更好地控制下一个上一个箭头何时出现?

enter image description here

最佳答案

来自文档:

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/

相关文章:

javascript - 如何在谷歌地图上找到经纬度的最小值和最大值

jQuery 悬停以设置左侧位置在 IE 中不起作用?

jquery - 有 2 个参数的选择器

javascript - jquery - 获取表格单元格的html字符串

javascript - 手动打开带有文本内容的 Featherlight Gallery

javascript - Sequelize 包含嵌套列 : Unknown column in 'where clause'

javascript - CSS - 谁能帮我弄清楚我的下拉菜单导航哪里出了问题?

javascript - 如何在 javascript 中按名称调用函数,其中整个代码包含在某个匿名函数中

lightbox - Featherlight 灯箱目标始终可见

javascript - Featherlight Gallery 中的二进制图像数据