【发布时间】:2011-05-08 22:22:09
【问题描述】:
我在使用 jquery fancybox 时遇到问题。我在fancybox 中显示一个表格。使用 iframe。当我单击弹出窗口上的任何位置时,它正在关闭。如果单击文本框/文本区域,它正在关闭。我希望它仅在我单击关闭按钮或提交表单按钮时关闭。有什么帮助吗?
链接-
<a href="{$this_path}productquestion-form.php?id_product={$smarty.get.id_product|intval}&content_only=1&TB_iframe=true&width=570&height=635&thickbox=true" class="thickbox">
fancybox 的选项设置为默认值。
$.fn.fancybox.defaults = {
padding : 10,
margin : 40,
opacity : false,
modal : false,
cyclic : false,
scrolling : 'auto', // 'auto', 'yes' or 'no'
width : 560,
height : 340,
autoScale : true,
autoDimensions : true,
centerOnScroll : false,
ajax : {},
swf : { wmode: 'transparent' },
hideOnOverlayClick : true,
hideOnContentClick : false,
overlayShow : true,
overlayOpacity : 0.7,
overlayColor : '#777',
titleShow : true,
titlePosition : 'float', // 'float', 'outside', 'inside' or 'over'
titleFormat : null,
titleFromAlt : false,
transitionIn : 'fade', // 'elastic', 'fade' or 'none'
transitionOut : 'fade', // 'elastic', 'fade' or 'none'
speedIn : 300,
speedOut : 300,
changeSpeed : 300,
changeFade : 'fast',
easingIn : 'swing',
easingOut : 'swing',
showCloseButton : true,
showNavArrows : true,
enableEscapeButton : true,
enableKeyboardNav : true,
onStart : function(){},
onCancel : function(){},
onComplete : function(){},
onCleanup : function(){},
onClosed : function(){},
onError : function(){}
};
【问题讨论】:
-
我已设置 hideOnContentClick = false。它适用于图片库。但不适用于 iframe。
-
在加载fancing框时发布代码的设置部分