在fancybox 1.2.6上关闭 [英] on fancybox 1.2.6 close

查看:107
本文介绍了在fancybox 1.2.6上关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用fancybox 1.2.6,当您单击内容的外部时,我想避免关闭fancybox..但是什么也没有用.提交表单时尝试触发fancybox关闭功能.我该怎么办?

I am using fancybox 1.2.6 I want to avoid closing of fancybox when you click on the outside of the content.. But nothing is working.. can you help me with this.. and one more thing.. i am trying to trigger the fancybox close function when you submit a form..How can i do that ?

推荐答案

在创建fancyBox时,将hideOnOverlayClick设置为false.这是一个示例:

set hideOnOverlayClick to false in your options when creating your fancyBox. Here's an example:

$("a.zoom1").fancybox({
    'hideOnOverlayClick'    :       0  
});

要在提交表单时将其关闭,请将onsubmit事件绑定到该表单,并在该onsubmit函数中使用:

To close it on the submit of your form, bind an onsubmit event to that form, and in that onsubmit function use:

$.fn.fancybox.close();

导致fancybox关闭.

to cause the fancybox to close.

这篇关于在fancybox 1.2.6上关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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