Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试这样的事情:var test = gallery.currentImage.index; 但没有任何效果。
var test = gallery.currentImage.index;
我发现了这种显示当前和绝对图像编号的简单方法。你可以按照这个例子。
http://www.twospy.com/galleriffic/example-5.html
我一直在使用 nextIndex,我认为它是一个从 0 开始的数组。例如,您可以使用“onSlideChange”触发某些内容,如下所示:
onSlideChange: function(prevIndex, nextIndex) { var idx = nextIndex + 1; if(idx==2) alert('hello world!); }