Fancyboxのウィンドウに問題があります。私は、私のページ(以下の ".popup"ファンシーボックス)に隠されたdivの内容を表示するためにfancyboxを使用します。このコンテンツには、#exempleという新しいfancyboxコンテンツへのリンクがあります。最初のfancyboxのリンクをクリックすると、2番目のfancyboxのコンテンツ(iframe - これは問題ありません)が読み込まれます。しかし、ユーザーが第2ファンシーボックスの閉じるボタンを押すと、最初のファンシーボックスに戻りたいと思います。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