Jssor非jquery滑块。一页上有多个滑块

时间:2014-03-17 21:54:46

标签: javascript slider

有没有办法在一个页面上放置多个滑块? 谢谢

1 个答案:

答案 0 :(得分:2)

在一个页面中给出2个滑块,第一个是' slider1',第二个是' slider2'

<script>
    jssor_slider1_starter = function (containerId) {
        ...
    };
    jssor_slider2_starter = function (containerId) {
        ...
    };
</script>
<div id="slider1_container" style="position: relative; top: 0px; left: 0px; width: 600px;
    height: 300px;">
    ...
    <script>
        jssor_slider1_starter('slider1_container');
    </script>
</div>
<div id="slider2_container" style="position: relative; top: 0px; left: 0px; width: 600px;
    height: 300px;">
    ...
    <script>
        jssor_slider2_starter('slider2_container');
    </script>
</div>