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

标签 javascript jquery transition cycle

如何转换到特定幻灯片,例如,如果我有 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/

相关文章:

javascript - Angular : Why my watch is not working

jQuery 动画速度?

Javascript - 将字符串从某个字符拼接到下一个字符

jquery - 如何在不提交的情况下验证表单并使用 jquery mobile 和 Jquery 验证转到其他页面?

javascript - jquery 和 CSS3 转换

d3.js - D3 : How to create slow transition of circle radii for nodes in force directed graphs?

css - 获取即将到来的 CSS 过渡属性

javascript - 在输入文本字段中设置光标位置

javascript - 通过 WebScriptObject 从 Objective-C 调用 Javascript

javascript - 如何在 D3 中沿 X 轴设置自定义刻度?或命名条形图中的条形?