任何人都知道如何将 jcoverflip 轮播中的图像循环成连续循环?我已经尝试过操纵 dom buf 当然它不起作用:P
任何想法?文档很差,我在谷歌上找不到太多
任何人都知道如何将 jcoverflip 轮播中的图像循环成连续循环?我已经尝试过操纵 dom buf 当然它不起作用:P
任何想法?文档很差,我在谷歌上找不到太多
您可以检查轮播是否在最后一项上,如果是,您可以使用其文档中描述的以下方法。
first([callback], [originalEvent={}])
Move the current to the start.
callback: a function to get called
originalEvent: the originating event object
您将使用该current
方法获取当前轮播位置,该方法也在文档中进行了描述。
current([newCurrent, [originalEvent]])
Get the current item index if no parameters are passed. If newCurrent is passed, then it will move the current item to the index.
我认为我已经解决了这个问题。
$(document).ready(function(){
$('#flip').jcoverflip({ current: 1 });
$('.next').click(function(){
$('#flip').jcoverflip('next', '1', true);
});
$('.prev').click(function(){
$('#flip').jcoverflip('previous', '1', true);
});
});
这对我来说非常有效-希望有所帮助。该 API 在 jcoverflip 网站上真的很糟糕。