elevatezoom icon indicating copy to clipboard operation
elevatezoom copied to clipboard

ElevateZoom on MagnificPopup

Open estebandinamarca opened this issue 10 years ago • 2 comments

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" });
      }
    }
    });

estebandinamarca avatar Feb 04 '15 03:02 estebandinamarca

Same problem. Version elevateZoom = 3.0.8

PutilovAI avatar Oct 29 '17 10:10 PutilovAI

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();
    }
  },
});

Faisal-nfl avatar Jan 09 '19 12:01 Faisal-nfl