elevatezoom
elevatezoom copied to clipboard
ElevateZoom on MagnificPopup
Zoom doesn't work on this "MagnificPopup lightbox"
Even using this method:
$('.open-lighbox').magnificPopup({
type:'inline',
alignTop: false,
overflowY: 'scroll',
midClick: true,
callbacks: {
open: function() {
// Will fire when this exact popup is opened
alert("test");
$("#img1").elevateZoom({ zoomType: "inner", cursor: "crosshair" });
}
}
});
Same problem. Version elevateZoom = 3.0.8
I think that when magnificPopup open it don't have data-zoom-image attribute I tried this variation as I am using gallery & its working fine.
$('.parent-container').magnificPopup({
delegate: 'a',
type: 'image',
gallery: {
enabled: true
},
callbacks: {
change: function(item) {
item.img.attr('data-zoom-image', item.src)
item.img.elevateZoom({
zoomType : "lens",
lensShape : "round",
lensSize : 200
});
},
close: function() {
$('.zoomContainer').remove();
}
},
});