elevateweb / elevatezoom

1.02k stars 493 forks source link

error with Modals #134

Open ramedlow opened 8 years ago

ramedlow commented 8 years ago

The plugin doesn't work with Modals (#109). I try to use the plugin with fancyBox: http://joxi.ru/5mdkNNYSpBdqr1

$('[rel="photo"]').fancybox({
    type: 'image',
    beforeShow () {
        $('.fancybox-image').elevateZoom({
            zoomType:` 'lens',
            lensShape: 'round',
            lensSize: 150
        });
    }
});
rahilbhansali commented 8 years ago

You will need to change the z-index of the zoom container via css is what i've found. Again - I am still figuring it out. Hope this helps.

eatoncw commented 7 years ago

I struggled through this and like @rahilbhansali found, ensuring the z-index of zoomContainer to be higher than the modal worked for me: $("#myModal").on('shown.bs.modal', function() { $(this).find(".modal-content").css("zIndex", 9000); $(".zoomContainer").css("zIndex", 9999); });