Jquery Jcarousel使用多个实例

时间:2012-09-18 02:23:47

标签: jquery jcarousel

好的,所以我在一个页面上有两个实例,我正在使用Jquery Jcarousel,但这里有障碍......

其中一个例子是“幻灯片”或“图片库”,所以我需要轮播一个接一个地循环...

在页脚中,我有另一个实例,其中“事实”列表以3的循环速率循环。

我怎样才能解决这个问题,所以我基本上可以吃蛋糕并吃掉它?

我希望能够逐个播放幻灯片循环并拥有“事实”列表,一次循环3个项目。

我曾尝试将该功能复制并重命名为“事实”之类的其他内容,但这不起作用。

这是我正在使用的插件:http://sorgalla.com/jcarousel/

帮助!

1 个答案:

答案 0 :(得分:3)

它们位于documentation

jQuery(document).ready(function() {
    // Initialise the first and second carousel by class selector.
    // Note that they use both the same configuration options (none in this case).
    jQuery('.first-and-second-carousel').jcarousel();

    // If you want to use a caoursel with different configuration options,
    // you have to initialise it seperately.
    // We do it by an id selector here.
    jQuery('#third-carousel').jcarousel({
        vertical: true
    });
});