0
こんにちは。隠されたインラインコンテンツをカラーボックスに表示しようとしていました。すべてがFirefoxでうまくいきますが、IE8では初めて動作し、次に失敗します。アラート(id)を使用するとき、id varはIEで2回目にundefinedとして出力されます。カラーボックスIEインラインhref関数が2回目に同じリンクがクリックされたときにトリガーされない
idを設定するためにクリックハンドラを試しましたが、同じ結果が得られました。ここにいくつかのサンプルHTML(簡潔にするために簡略化)があります。これは
<div class="my-div">
<a class="pop-extra nid-628 cboxElement" href="/alex-f">the link triggering colorbox</a>
<div id="628" class="inline-content" style="display: none;">
The hidden content to display
</div>
</div>
は、ここに私のjqueryの
$(document).ready(function() {
// Hide inline content
$('.inline-content').hide();
//Fire colorbox
$('a.pop-extra').colorbox(
{
height:700,
width:420,
inline:true,
//Set the inline content to display dynamicaly by grabing the next div id
href:
function(){
id = $(this).next().attr("id");
return '#'+id;
},
onOpen:function(){
//Show the content so colorbox has something to display
$('#'+id).show();
},
});
$(document).bind('cbox_closed', function(){
//Hide content again when colorbox closes
$('#'+id).hide();
});
だDrupalのCMSによって生成される
}); http://eyestoneartists-com-au.kept.com.au/browse-extras/male/all
を、もう一度それをクリックして画像を閉じる、イメージの1つをクリックするIE8に再現するには、次のデモには、次のURLからご覧下さい確認するには
。
提供されたリンクに問題が見つかりません。 IE8ではうまく動作します。 – rahul
同じリンクが2回目にクリックされた場合 –