我有一个画廊,在那里我启用了elevateZoom。这个电梯也是在画廊外面启用的。如何隐藏外部展厅外的电梯变焦。下面是正在使用的简单代码。我试过用鼠标保存,但这似乎行不通。
(function($){
$(document).ready(function () {
$('.rg-image-wrapper').mouseleave(function(){
$('.zoomContainer').hide();
});
$('#zoombtn').on('click', function(){
if( $('.enabled').length === 0){
$('.zoomContainer').show();
$("#zooom").elevateZoom({
zoomType: "lens",
lensShape : "square",
cursor: "crosshair"
});
$(this).toggleClass('enabled');
}
else{
$(this).toggleClass('enabled');
$('.zoomContainer').hide();
}
});
});
})(jQuery); ScreenShots of elevateZoom走出帧.

发布于 2016-11-15 10:27:30
更新:如果我正确理解你,你想要图像约束。
$("#zoom_01").elevateZoom({constrainType:"height", constrainSize:274, zoomType: "lens", containLensZoom: true, gallery:'gallery_01', cursor: 'pointer', galleryActiveClass: "active"});

https://stackoverflow.com/questions/40607253
复制相似问题