使用jQuery Cycle 2进行可变幻灯片超时

我正在尝试设置幻灯片,以使用数据属性在每张幻灯片上设置超时.这适用于jQuery Cycle,但不适用于jQuery Cycle 2.我想我可能使用了错误函数,但在Cycle 2文档中没有找到类似的东西?

HTML:

JS:

$('#slides').cycle({
    fx: 'fadeout',speed: 250,timeoutFn: function(currElement,nextElement,opts,isForward) { 
        return parseInt($(currElement).attr('data-duration'),10);
    }
});
最佳答案
Cycle2直接支持.在幻灯片上使用data-cycle-timeout属性而不是data-duration.

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: <span id=&quot...
jQuery 添加水印 <script src="../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...