基本 jQuery 滑块中上一张/下一张幻灯片的自定义链接触发器 [英] Custom Link Trigger for Previous/Next Slide in Basic jQuery Slider

查看:18
本文介绍了基本 jQuery 滑块中上一张/下一张幻灯片的自定义链接触发器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个基于 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 点击事件(例如 $('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');
});

这篇关于基本 jQuery 滑块中上一张/下一张幻灯片的自定义链接触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆