1

我有一个 flowlider 滑块,这里是项目的页面http://www.flowslider.com/ 这是一个非常易于使用的滑块但是我不知道如何降低滑动速度,站点中没有工作示例

这是我的滑块初始化代码:

<script>
    jQuery(document).ready(function($) {

        // Select your slider element and call Flow Slider plugin.
        var $slider = $("#slider");
        $slider.FlowSlider({

            controllerOptions: [{
                mouseStart:100,
                mouseEnd:100,
            }],

            marginStart:20,
            marginEnd:20,
            mode:"horizontal"    
        });    
    });
</script>

实际的滑块只是一个

<div id="slider">
a bunch of PHP generated divs here, each one is a slider element
</div>

我尝试设置speedcoefficient没有任何结果

4

2 回答 2

1

你不能改变滑动速度,这是因为滑动速度取决于user mouse action ( user mouse movement)andthe width of content divthe count of images in it。这意味着当您将鼠标缓慢地滑过幻灯片时,滑动速度会很慢,而当您快速移动时,幻灯片会快速移动。
这张幻灯片不是那种在一段时间内重复滑动的幻灯片。

于 2013-03-30T08:54:17.217 回答
0

如文档中所写,HoverCenter您可以使用coefficient或编写您自己的moveFunction. 文档中似乎controllerOptions缺少一个列表。

要开始coefficient工作,请使用以下内容:

$('#flowslider').FlowSlider({
    mode: 'horizontal',
    marginStart: 0,
    marginEnd: 0,
    controllers: ['HoverCenter'],
    controllerOptions: [{
        coefficient: 0.1
    }]
});
于 2013-09-07T15:22:13.620 回答