在fancybox中打开HTML页面

5

我在网上找了一些例子,但是没有找到任何相关的资料。

我该如何在fancybox中上传新的html文件?

 $('#Create').click(function() {
 $.fancybox({

 What should be the content over here?
 (lets say i want to load stackoverflow.com)

 });
1个回答

11

文档就在网站上,您可以使用 iframe 标签:

$("#iframe").fancybox({
    'width'         : '75%',
    'height'        : '75%',
    'autoScale'     : false,
    'transitionIn'  : 'none',
    'transitionOut' : 'none',
    'type'          : 'iframe'
});

HTML

<a href="http://www.example?iframe">This goes to iframe</a>

or

<a id="iframe" href="http://www.example">This goes to iframe</a>

你可以在这里找到所有的信息:http://fancybox.net/howto


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接