Open vadamovsky opened 8 years ago
The only workaround I was able to find is to change the dimension of the iframe after it is launched:
$(document).ready(function() {
$('.popup-iframe1').magnificPopup({
disableOn: 1200,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false,
callbacks: {
open: function() {
var objs = document.getElementsByClassName("mfp-content");
if (objs.length > 0) {
var obj = objs[0];
obj.style.width = "1200px";
obj.style.maxWidth = "1200px";
obj.style.height = "706px";
}
},
close: function() {
}
}
});
});
Is it possible to have two iframes with different dimensions on one page?
I can specify the dimensions of the iframe with:
But this will change the dimensions of all iframes at one page.
I have two links on one page and each link should open an iframe with a different dimensions.
In FancyBox I can specify the dimensions of every iframe with:
But this doesn't work with Magnific Popup.