jquery と colorbox ライトボックス プラグインを使用して、ライトボックスで iframe を開きます。
問題は:
- ボタンをクリックすると、メインの iframe ライトボックスが開きます
- メインの iframe ライトボックス内 - クラス .flash_shareable のボタンがあります
- クリックすると、親 (メイン iframe) が閉じられ、リンク先の新しい iframe が開きます。
親iframeを閉じていますが、新しいiframeを開いていません。
私のコード:
$(document).ready(function(){
var y = $(document.body).height();
var x = $(document).width();
parent.$.colorbox.resize({innerWidth:x, innerHeight:y});
$('.iframe').colorbox({iframe:true}); //ligthbox
$(".flash_shareable").click(function() {
parent.$.colorbox.close();
$.colorbox({href:"faq.html", iframe:true, width:800 + "px", height:600 + "px", open:true});
})
});
別のライトボックスを開こうとしているiframe の HTML :
<button class="flash_shareable" type="button">open flash</button>