Answer the question
In order to leave comments, you need to log in
How to display content in fancybox?
Good afternoon! The essence of the question is this, how to make another page open in full size, without taking into account the screen?
Answer:
$("#b").fancybox({
openEffect : 'none',
closeEffect : 'none',
type : 'iframe',
width: 800,
onComplete : function(e) {
$('#fancybox-frame').load(function() {
var iframe = document.getElementById("fancybox-frame");
var iframewrap = document.getElementById("fancybox-content");
console.log(iframe);
console.log(iframewrap.height);
iframewrap.style.height = iframe.contentDocument.body.scrollHeight + 30 + 'px';
iframe.style.height = iframe.contentDocument.body.scrollHeight + 'px';
});
}
});
Answer the question
In order to leave comments, you need to log in
Like this picture opens in full size.
$("#b").fancybox({
openEffect : 'none',
closeEffect : 'none',
type : 'iframe',
width: 800,
onComplete : function(e) {
$('#fancybox-frame').load(function() {
var iframe = document.getElementById("fancybox-frame");
var iframewrap = document.getElementById("fancybox-content");
console.log(iframe);
console.log(iframewrap.height);
iframewrap.style.height = iframe.contentDocument.body.scrollHeight + 30 + 'px';
iframe.style.height = iframe.contentDocument.body.scrollHeight + 'px';
});
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question