【问题标题】:Need help changing the speed duration of slides with Jquery scripts需要帮助使用 Jquery 脚本更改幻灯片的速度持续时间
【发布时间】:2013-03-25 14:41:43
【问题描述】:

所以首先我基本上没有 javascript 或 Jquery 的工作知识。其次,我尝试查找此问题的答案并尝试了一些方法,但对我没有任何帮助。

我的幻灯片似乎每 6 或 7 秒更换一次。我想让每张幻灯片持续更长时间。也许在改变之前大约 12 秒。我已尝试更改速度和超时值,并为暂停功能添加鼠标悬停,但没有任何效果。

这是网页模板中内置的代码。上半部分看起来是用于管理员编辑,而底部是一般页面视图。非常感谢您提供任何帮助。

jQuery.noConflict();     
jQuery(document).ready(function($){

// Checks for Admin to apply fixes for backend
if ( $('#adminbar #toolbar').length ) {

    $('#features').cycle({
        fx: 'scrollRight',
        speed: 100,
        next: '#next',
        prev: '#prev',
        timeout: 0
    });
    $("#controls").show();
    $("ul#featuredNav").css({
        'margin-top': '-38px'
    });
    $("ul#featuredNav li").css({
        'margin': '-20px 0 90px',
        'padding': '0 0 0 20px'
    });
    $("#featuredWrapper").css({
        'margin': '0 0 80px'
    });
}
else {

    $('#features').cycle({
        fx: 'scrollRight',
        pager:  '#featuredNav',
        speed: 500,
        timeout: 6000,        
        pagerAnchorBuilder: function(idx, slide) {
            // return selector string for existing anchor
            return '#featuredNav li:eq(' + idx + ')';
        },
        updateActivePagerLink: function(pager, currSlideIndex) {
            $(pager).find('li').removeClass('activeTab')
                .filter('li:eq('+currSlideIndex+')').addClass('activeTab');
        }
    });
    $("#controls").hide();
}
});

【问题讨论】:

    标签: javascript jquery performance slideshow cycle


    【解决方案1】:

    改变

    timeout: 6000,  
    

    timeout: 12000,  
    

    然后清除您的浏览器网站缓存。

    【讨论】:

    • 缓存清除一定是我遇到问题的原因,再次感谢,我很感激。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-08
    • 1970-01-01
    • 2011-10-28
    • 2015-07-10
    • 1970-01-01
    相关资源
    最近更新 更多