Jquery fancybox problem
i am having problem with jquery fancybox. I am showing a form in fancybox. using iframe. when i am clicking any place on the popup, it is closing. if click on the textbox/textarea, it is closing. i want it to close only when i click the close button or submit form button. Any help?
for link-
<a href="{$this_path}productquestion-form.php?id_product={$smarty.get.id_product|intval}&content_only=1&TB_开发者_Go百科iframe=true&width=570&height=635&thickbox=true" class="thickbox">
options are set default for 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(){}
};
hideOnOverlayClick true Toggle if clicking the overlay should close FancyBox
hideOnContentClick false Toggle if clicking the content should close FancyBox
Read the api should help you with all the different settings and options, overlay is the black background [semi-transparent]
http://fancybox.net/api
So you should also check that fancy box options on[inside] your iframe are not different, also check that On top of the content you are clicking does not have another element on top of it that is transparent and may act silly other wise post a link to your site if possible or use jsfiddle to double check if its a fancy box error, or somehing else you have done to cause this.
精彩评论