错误缩放(elevateZoom + cycle2)jQuery

时间:2014-11-29 21:36:50

标签: jquery jquery-cycle2

我无法使用elevateZoom运行jquery Cycle2,但我显然无法在第二个滑块或转换中启动。

点击下一个时有机会运行吗?

$(".zoom").elevateZoom({
    constrainType:"height",
    zoomType : "lens",
    cursor: "crosshair",
    containLensZoom: true,
    gallery:'cycle',
    cursor: 'pointer',
    galleryActiveClass: "cycle-slide-active"
});

示例:http://jsfiddle.net/csy2dh6b/

1 个答案:

答案 0 :(得分:1)

代码修复:

        $('#cycle').on('cycle-next cycle-prev', function (event, optionHash) {
            var image = $("#cycle img.cycle-slide-active").attr('src');
            $(".zoomLens").css('background-image', 'url(' + image + ')');
            return false;
        });

示例:http://jsfiddle.net/csy2dh6b/2/