是否可以将$ DisplayPieces:2合并到一个尚未拥有它的滑块演示中?

时间:2014-11-14 17:39:18

标签: javascript slider jssor

我在这里修改这个主题 http://www.jssor.com/testcase/full-screen-slider-new-api.source.html 我试图添加$ DisplayPieces:2,但它似乎打破了:/ 是否可以将其他演示中的功能合并到此演示中? 任何建议将非常感谢:)

1 个答案:

答案 0 :(得分:0)

要在幻灯片容器中显示多个幻灯片,您可以手动设置$ SlideWidth以适合幻灯片容器。

在上面提到的演示中,幻灯片容器的宽度为600px,请将$ SlideWidth设置为300。

var options = {
    $SlideWidth: 300,
    $DisplayPieces: 2,
    $SlideDuration: 800,                                //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
    $DragOrientation: 3,                                //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
    $AutoPlay: true,                                    //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
    $AutoPlayInterval: 1500                            //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
};