从开放'fancybox'中的功能关闭精美的盒子 [英] close fancy box from function from within open 'fancybox'

查看:180
本文介绍了从开放'fancybox'中的功能关闭精美的盒子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好我希望能够在内部打开时关闭fancyBox。

Hi all i want to be able to close fancyBox when it is open from within.

我尝试过以下但无济于事:

I have tried the following but to no avail:

function closeFancyBox(html){
    var re = /.*Element insert complete!.*/gi;
    if( html.search( re ) == 0 ){
        $.fancybox.close();
        //alert("foo");
    }
}

foo将在对话框中打开但不会关闭。任何提示?

foo will open in dialog but will not close down. any hints?

推荐答案

试试这个:
parent。$。fancybox.close( );

Try this: parent.$.fancybox.close();

请参阅 Fancybox API文档

这篇关于从开放'fancybox'中的功能关闭精美的盒子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆