Home › Forums › Other › Fancybox PDF through dynamic href › Re: Fancybox PDF through dynamic href
May 8, 2013 at 2:40 pm
#134471
Member
I wasn’t trying to embed a PDF, I got that part wrong, so finally I fixed this code, now i’m able to display my dynamic PDF inside the fancybox. Here’s the code:
$(document).ready(function () {
$(“.pdf”).fancybox({
type: ‘iframe’,
width: 800,
height: 1000,
fitToView: false,
autoSize: false,
iframe : {
preload: false
}
});
}); // ready
And my PHP code was corrected as well:
echo “
“;
I found a little issue trying to open this on IE & Chrome, so this line of code saved my life:
iframe : {
preload: false
}
I leave it here so anybody can use it, cheers!