carouFredSel - 将可见数量设置为实际图像数量 - 并且仍然滚动?

Joh*_*ton 6 caroufredsel

我正在使用这个卷轴

http://coolcarousels.frebsite.nl/c/2/

我在下面有这个设置.

我的问题是我设置了它visible: 4,我有4个图像,所以它不滚动.如果我将它设置为visible: 3然后它按预期工作.但是,当您在1920px宽分辨率上打开浏览器的全宽时,我想在一个屏幕上显示所有4个图像.所以问题似乎是.如果我将图像数量设置为可见,那么它就会停止工作.

有没有办法一次在屏幕上显示所有4个图像然后仍然滚动它们?

$(function() {
    $('#carousel').carouFredSel({

        width: '100%',  
        align: 'left',

        items: {
            visible: 4,
            start: 0,


        },
        scroll: {
            items: 1,
            queue           : true,
            fx: "scroll",
            easing: "swing",
            duration: 1000,
            timeoutDuration: 3000
        },

        prev: '.prev',
        next: '.next',


        auto: {
            easing: "quadratic",
            button: '.play',

            pauseOnEvent: 'resume',
                pauseOnHover: true
        }

    }).find(".slide .plusNav").hover(
              function() { $(this).find("div").slideDown(); },
              function() { $(this).find("div").slideUp();   }
    );
});
Run Code Online (Sandbox Code Playgroud)

小智 7

试试这个

items: {
    minimum: 0,
},
Run Code Online (Sandbox Code Playgroud)


Cor*_*rey -1

我可以通过编辑源代码来做到这一点:/

如果您像这样注释掉 jquery.carouFredSel-6.2.0.js 中的第 554 和 556 行...

//  not enough items
var minimum = (is_number(opts.items.minimum)) ? opts.items.minimum : opts.items.visible + 1;
if (minimum > itms.total)
{
    // e.stopImmediatePropagation();
    // return debug(conf, 'Not enough items ('+itms.total+' total, '+minimum+' needed): Not scrolling.');
}
Run Code Online (Sandbox Code Playgroud)

...这对我有用。