3
私は、異なるdivボディを含むポップアップを持っています。ひとつは、押されたボタンに従って表示されます。 機能は以下のIE7で動作します:IE7でjqueryが非表示になるのはなぜですか?
function openPopup(popupDiv){
//The popup is a div with id name popupDiv
//It contains several bodies such as
//alertPopupDiv, uploadPopupDiv, removePopupDiv
//The div id name of the body to show is passed to the function
//First hide all the bodies
$("#popupDiv div[id$=PopupDiv]").each(function (i)
{this.style.visibility='hidden';});
//Now show the relevant div
var div = document.getElementById(popupDiv);
if(div != null)
{div.style.visibility = 'visible';}
//Now call the function to load the popup itself
loadPopup();
}
を理想的に私が使用するようにしていますはるかに簡単:FirefoxとIE8で結構ですが、(IE7では動作しません
function openPopup(popupDiv){
$("div[id$=PopupDiv]").hide();
$(popupDiv).show();
loadPopup();
}
それが呼び出された最初の時間を動作しますが、関数は呼び出しが新しいコンテナでポップアップを開いている場合は、それが適切にレンダリングするために失敗した。
ありがとうございました。 'Visible'は 'インライン'と同様に動作しますが、IE7では2番目の関数の非表示/表示がなぜ機能しないのかまだよくわかりません – DanB