Fancybox:从另一个函数触发fancybox iframe的最佳方法是什么

Rin*_*rge 0 jquery fancybox

我想从另一个函数启动fancybox.一些ajax函数获得成功后我需要这个触发器.

代码库

$.post('principals/search_post/'+value, function(data) {

   **// I need to call fancybox here**

});
Run Code Online (Sandbox Code Playgroud)

编辑

我有一个像http://example.com/somepage这样的网址.我需要在ajax函数之后使用fancybox在iframe中打开它.

Jan*_*nis 6

您可以手动打开fancybox:

$.fancybox.open({
    href: 'your_url',
    type: 'iframe'
});
Run Code Online (Sandbox Code Playgroud)