2011-05-08 4 views
1

jquery fancybox에 문제가 있습니다. fancybox에 양식을 표시하고 있습니다. iframe을 사용합니다. 팝업에서 아무 곳이나 클릭하면 닫힙니다. 텍스트 상자/텍스트 영역을 클릭하면 닫힙니다. 닫기 버튼을 클릭하거나 양식 버튼을 제출할 때만 닫으려고합니다. 어떤 도움이 필요합니까? 링크 -Jquery fancybox 문제

<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(){} 
    }; 
+0

hideOnContentClick = false로 설정했습니다. 그것은 이미지 갤러리에 잘 작동하고 있습니다. 하지만 iframe에는 해당되지 않습니다. –

+0

화급 상자를로드하는 동안 코드의 설정 부분 게시 – kobe

+0

일부 세부 사항 추가 –

답변

0
hideOnOverlayClick true Toggle if clicking the overlay should close FancyBox 
hideOnContentClick false Toggle if clicking the content should close FancyBox 

모든 다른 설정과 옵션을 도움이 API를 읽고는, 오버레이

http://fancybox.net/api

그래서 당신은 또한 공상을 확인해야합니다 [반투명] 검은 배경입니다 iframe 내부의 상자 옵션은 다르지 않습니다. 또한 클릭하는 콘텐츠 상단에는 투명하고 바보처럼 행동하는 다른 요소가 없습니다. 가능한 경우 사이트 링크를 게시하십시오. jsfiddl 사용 e는 그것의 공상적인 상자 오류, 또는 당신이 이것의 원인을하기 위해 한 다른 행동인지 다시 한번 확인합니다.