Reputation: 1
I am trying to use elevate zoom
in a modal using bootstrap.
I tried everything and unfortunately had no result.
I would appreciate if someone could give me any similar sample
Upvotes: -1
Views: 2440
Reputation: 1235
I had the same problem. I manage to solve it looking at this anwser, but changing the zoomType to lens mode (see docs).
So my code, to use elevate zoom in my modal, is:
1) Adjust Css:
.zoomContainer{ z-index: 9999;}
.zoomWindow{ z-index: 9999;}
2) Call te plugin when the modal is ready:
$('#myModal').on('shown.bs.modal', function() {
$("#zoom_05").elevateZoom({
zoomType: "lens",
lensShape: "round",
lensSize: 300
});
});
As you can see, i used also the lensSize option to 300, to make the zoom bigger; That's because the Mousewhell zoom has some problem when in a boostrap modal, meanwhile the lens mode is a fast solution already working as it is.
Upvotes: 2