单击按钮时如何移动旋转木马项目? [英] How to move carousel item when click a button?
本文介绍了单击按钮时如何移动旋转木马项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用水车旋转木马我想基于按钮单击来调用移动功能
I am working with waterwheel carousel I want to call move function based on my button click
这是我的代码:
function myFunction()
{
$("#waterwheel-carousel-default").waterwheelCarousel().moveOnce(true);
}
给我一个错误
TypeError:'undefined'不是一个函数(计算'$(#waterwheel-carousel-default").waterwheelCarousel().
TypeError: 'undefined' is not a function (evaluating '$("#waterwheel-carousel-default").waterwheelCarousel().
有谁能帮忙?
推荐答案
在左侧按钮中输入以下内容:
In left button write this :
$("#waterwheel-carousel-default").find('.carousel-controls .carousel-prev').trigger('click');
在右键中输入以下内容:
In right button write this :
$("#waterwheel-carousel-default").find('.carousel-controls .carousel-next').trigger('click');
尝试一下.
这篇关于单击按钮时如何移动旋转木马项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文