Basic jQuery Slider中上一张/下一张幻灯片的自定义链接触发器 [英] Custom Link Trigger for Previous/Next Slide in Basic jQuery Slider
问题描述
我正在基于 Basic jQuery Slider ( http://www.basic-slider.com )由John Cobb( https://github创建) .com/jcobb/basic-jquery-slider ).
I am working on a slider project based on the Basic jQuery Slider (http://www.basic-slider.com) creatd by John Cobb (https://github.com/jcobb/basic-jquery-slider).
问题:给定我的项目规格,而不是使用默认控件,我需要在当前幻灯片下方添加一个链接,以显示下一张幻灯片的标题,并在单击该链接时将其转到该幻灯片.
The problem: Given my project specs, instead of using the default controls, I need to add a link below the current slide that shows the title of the next slide and when that link is clicked the slider goes to the that slide.
我的问题:是否可以使用简单的jQuery click事件(例如$('a.next).click(... [trigger] ...))来触发移至下一张幻灯片的方法?如何调用触发器?
My question: Is there a way to trigger the move to the next slide using a simple jQuery click event (e.g., $('a.next).click(...[trigger]...)) ? How can I call the trigger?
非常感谢您的帮助.
推荐答案
如果将默认控件设置为隐藏(通过设置不透明度或不显示任何内容),则应该可以使用以下代码:
If you set the default controls to hidden, either by setting the opacity or display none, you should be able to use this code:
$('a.next').click(function() {
$('.bjqs-next a').trigger('click');
});
$('a.prev').click(function() {
$('.bjqs-prev a').trigger('click');
});
这篇关于Basic jQuery Slider中上一张/下一张幻灯片的自定义链接触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!