Flexslider - advance to next slide via on click

与世无争的帅哥 提交于 2019-12-08 05:36:12

问题


hoping someone can help me with a Flexslider question.

Here's a link to the slider:

http://www.findspace.co.uk/FINDSPACE2014/pages/3bed_biddrdb.html

I would really like to add an onlick function so that users can click on the current main large image and advance to the next slide. I don't mind if the directional arrows need to come off to achieve this. I guess it would need to also go back to the initial slide at the end of the sequence.

Any help would be really appreciated.

Antony


回答1:


This is how you do it

$('.flexslider').flexslider({
directionNav : false,
slideshow: false,
animation: "slide",
controlsContainer: ".flex-container",
start: function(slider) {
$('.slides li img').click(function(event){
    event.preventDefault();
    slider.flexAnimate(slider.getTarget("next"));
});
}
});

:)



来源:https://stackoverflow.com/questions/26104112/flexslider-advance-to-next-slide-via-on-click

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!