Search code examples
jqueryfancybox

Fancybox iFrame content not showing


I am using the iFrame function for the first time to pull pages from a site I am developing, so these pages are within the same domain.

You can see the same here: http://ee.rouviere.com/photo/portfolio if you click on the first thumbnail image Architecture you will see that the page loads but it is incomplete.

Most of the styling is stripped out and the side row of thumbnails is missing. You can see the page that it is pulling from here: http://ee.rouviere.com/photo_portfolio

The code I am using to launch the iFrame is:

$("a.view-preview2").fancybox({
       'frameWidth'    :       500,
       'frameHeight'   :       500,
       'hideOnContentClick': false
  });

I tried the iFrame example on fancybox.net and it works perfectly so I am not sure what I am missing here. Any help will be greatly appreciated!

Thank you.


Solution

  • jQuery(document).ready(function() {
          $("a.image-preview").fancybox({
               'frameWidth'    :       500,
               'frameHeight'   :       500,
               'hideOnContentClick': false, 
               'type':'iframe'
          }); 
    });
    

    Have you tried adding 'type':'iframe'