我有一个猫头鹰旋转木马,当我点击图像时想要转到下一个图像。没有箭头或分页等。
我没有太多使用猫头鹰旋转木马的经验。
这就是我的HTML中的内容。我将touchDrag设置为true,但是我希望在图像上单击以前进到下一个图像。
$(document).ready(function(){
"use strict";
//Carousel
$(".carousel").owlCarousel({
items : 1,
autoPlay: true,
touchDrag : true,
mouseDrag : true,
singleItem:true,
responsive:true,
autoHeight : true,
transitionStyle:"fade"
});
});发布于 2017-01-27 21:21:21
您可以将单击处理程序附加到轮播幻灯片本身,从而将其移动到下一张幻灯片上。
$(document).ready(function(){
//Carousel
var owl = $(".carousel").owlCarousel({
items : 1,
autoPlay: true,
touchDrag : true,
mouseDrag : true,
singleItem:true,
responsive:true,
autoHeight : true,
transitionStyle:"fade"
});
$('.owl-item').click(function() {
owl.trigger('next.owl.carousel');
})
});https://stackoverflow.com/questions/41894838
复制相似问题