【问题标题】:trying to add a pager to carouFredSel slide show尝试向 carouFredSel 幻灯片放映添加寻呼机
【发布时间】:2014-08-20 07:46:14
【问题描述】:

我正在尝试向我的 carouFredSel 幻灯片放映添加一个简单的分页。我几乎让它工作了,但是左右两边的不透明图像不想企业化。当我单击右侧的页面按钮时,右侧的不透明 img 将不执行任何操作,当我单击左侧的页面按钮时,左侧的 img 将不执行任何操作。我离得那么近,我可以尝到胜利的滋味。

我试图做的是添加:

分页:“#page2”,

到第 26 行。它有点工作,但不完全。

My jsfiddle

$(function() {
    var $l = $('#carousel-left'),
        $c = $('#carousel-center'),
        $r = $('#carousel-right');

    $l.carouFredSel({
        auto: false,
        items: 1,
        direction: 'right',
        prev: {
            button: '#prev',
            fx: 'fade', // left side when prev is clicked
            onBefore: function() {
                setTimeout(function() {
                    $c.trigger( 'prev' );
                }, 1);
            }   
        },
        next: {
            fx: 'fade' //right side when next is clicked
        }
    });
    $c.carouFredSel({
        auto: false,
        items: 1,
        pagination: "#page2",
        prev: {
            onBefore: function() {
                setTimeout(function() {
                    $r.trigger( 'prev' );
                }, 1); //effected only on previous button click
            }
        },
        next: {
            onBefore: function() {
                setTimeout(function() {
                    $l.trigger( 'next' );
                }, 1); // effects left side
            }
        }
    });
    $r.carouFredSel({
        auto: false,
        items: 1,
        prev: {
            fx: 'fade' //right side when prev is clicked
        },
        next: {
            button: '#next',
            fx: 'fade', //right side when next button is clicked
            onBefore: function() {
                setTimeout(function() {
                    $c.trigger( 'next' );
                }, 1); //delay for center img
            }
        }
    });
});

【问题讨论】:

    标签: jquery slideshow caroufredsel


    【解决方案1】:

    查看您的 JSFiddle 后,您的导航箭头似乎按预期工作。一次向左或向右移动一张幻灯片。

    您在底部的彩色分页似乎也正常运行。

    您的问题可能与浏览器有关吗?与谷歌浏览器一样,它似乎按预期运行..

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多