【问题标题】:Galleriffic: get the current and absolute Image NumberGalleriffic:获取当前和绝对图像编号
【发布时间】:2012-05-24 19:30:58
【问题描述】:

我尝试这样的事情:var test = gallery.currentImage.index;
但没有任何效果。

【问题讨论】:

  • 我遇到了同样的问题...我不知道如何显示当前数字和总数
  • 试试这个:variablename = gallery.currentImage.index (for the current) variablename = gallery.data.length-1; (最后/总计)我希望它会起作用

标签: image gallery image-gallery


【解决方案1】:

我发现了一种显示当前和绝对图像编号的简单方法。你可以按照这个例子。

http://www.twospy.com/galleriffic/example-5.html

【讨论】:

    【解决方案2】:

    我一直在使用 nextIndex,我认为它是一个从 0 开始的数组。例如,您可以使用“onSlideChange”触发某些内容,如下所示:

    onSlideChange: function(prevIndex, nextIndex) {
    var idx = nextIndex + 1;
    if(idx==2)
    alert('hello world!);
    }
    

    【讨论】:

      猜你喜欢
      • 2020-02-08
      • 2011-03-31
      • 1970-01-01
      • 1970-01-01
      • 2010-09-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-08
      相关资源
      最近更新 更多