4

I see this example : http://jsfiddle.net/STgGM/ on the FancyApps page, but I need to do similar, but with an iframe! When I replace the image path with a URL it does not do anything, no errors or anything.

$.fancybox.open([
{
    href : 'http://fancyapps.com/fancybox/demo/1_b.jpg',
    title : '1st title'
},
{
    href : 'http://fancyapps.com/fancybox/demo/2_b.jpg',
    title : '2nd title'
}    
], {
    padding : 0   
});

How can I modify this code to do show my url in an iframe.

I have also tried this variation:

$.fancybox({
    href: url,
    openEffect: 'none',
    closeEffect: 'none',
    width: 960,
    height: 540
});

Thanks, Jason

4

1 回答 1

22

尝试使用“类型”选项。

例子:

$.fancybox.open({
    padding : 0,
    href:'http://www.gamespot.com',
    type: 'iframe'
});

小提琴:http: //jsfiddle.net/STgGM/1329/

文档: http: //fancyapps.com/fancybox/#docs

于 2013-06-15T18:19:43.260 回答