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

2022-01-24 00:00:00 slider javascript

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

Is there way to put multiple sliders on a single page? Thank you

推荐答案

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

Given 2 sliders in one page, the first is 'slider1', the second is '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>

相关文章