gpt4 book ai didi

javascript - 如何过渡到特定幻灯片,JQuery 循环插件

转载 作者:行者123 更新时间:2023-11-28 09:57:26 25 4
gpt4 key购买 nike

如何转换到特定幻灯片,例如,如果我有 1,2,3,4,5 按钮,当前幻灯片是 4,我想转到 2 幻灯片,我该如何做JQuery循环插件

$.fn.cycle.defaults = {
animIn: {},
animOut: {},
fx: 'fade',
after: null,
before: null,
cssBefore: {},
cssAfter: {},
delay: 0,
fit: 0,
height: 'auto',
metaAttr: 'cycle',
next: null,
pause: 0,
prev: null,
speed: 1000,
slideExpr: null,
sync: 1,
timeout: 4000
};

可以使用以下哪个选项来做到这一点?

最佳答案

根据文档,herehere ,很明显,cycle 插件通过使用 pager 选项支持开箱即用的分页,该选项指定哪个元素应充当分页器。

$('#s4') 
.before('<div id="nav">') //insert the pager element before the cycled element
.cycle({
fx: 'turnDown',
speed: 'fast',
timeout: 0,
pager: '#nav'
});

关于javascript - 如何过渡到特定幻灯片,JQuery 循环插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9790195/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com