Fancybox 윈도우에 문제가 있습니다. fancybox를 사용하여 내 페이지 (".popup"fancybox)에 숨겨진 div의 내용을 표시합니다. 그 내용에는 #exemple이라는 새로운 fancybox 내용에 대한 링크가 있습니다. 첫 번째 fancybox에서 링크를 클릭하면 두 번째 fancybox 콘텐츠 (iframe -이 작동)가로드됩니다. 하지만 사용자가 두 번째 fancybox의 닫기 버튼을 클릭하면 첫 번째 fancybox로 돌아가고 싶습니다.Fancybox on closed 이벤트의 Fancybox에 새 컨텐츠로드
나는 "onClosed"이벤트와 시도했지만 작동하지 않습니다 ...
그렇게 할 수있는 방법이 있나요?도움을 주셔서 감사합니다. 여기
내가 사용하는 코드입니다 :$("#exemple").fancybox({
'width' : '100%',
'height' : '100%',
'titleShow' : true,
'titlePosition' : 'over',
'titleFormat' : formatTitle,
'autoScale' : false,
'centerOnScroll' : true,
'type' : 'iframe',
'onClosed' : function() {
alert('test');
$(".popup").trigger('click');
}
});
$(".popup").fancybox({
'autoScale' : false,
'centerOnScroll' : true
});
// and here is the HTML code to trigger the hidden div:
<a style="font-weight: bold;" href=#data class=popup>our data</a>
//and the HTML code of the link inside the hidden div that gets displayed in the fancybox:
<a id=exemple title="xxx" href=xxx.php?id=xxx>link</a>
을 위해 잘 작동
(확장자를 사용)
내가 자동으로 fancybox를 호출 M : 우리는 "JS"를 넣어해야합니까? – armonge