jcoverflipカルーセル内の画像を連続ループにループする方法を知っている人はいますか? 私はdom buf ofcourseを操作しようとしましたが、うまくいきません:P
何か案が?ドキュメントは非常に貧弱で、Googleであまり見つけられませんでした
jcoverflipカルーセル内の画像を連続ループにループする方法を知っている人はいますか? 私はdom buf ofcourseを操作しようとしましたが、うまくいきません:P
何か案が?ドキュメントは非常に貧弱で、Googleであまり見つけられませんでした
私はこれを解決したと思います。
$(document).ready(function(){
$('#flip').jcoverflip({ current: 1 });
$('.next').click(function(){
$('#flip').jcoverflip('next', '1', true);
});
$('.prev').click(function(){
$('#flip').jcoverflip('previous', '1', true);
});
});
これは私にとって完璧に機能します-役に立てば幸いです。jcoverflip サイトの API は本当にひどいものです。
カルーセルが最後の項目にあるかどうかを確認できます。そうである場合は、ドキュメントに記載されている次の方法を使用できます。
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.