3
다른 div 본문이 포함 된 팝업이 있는데, 하나는 버튼을 눌렀을 때 표시됩니다. 기능은 다음과 IE7에서 작동 :jquery가 IE7에서 제대로 작동하지 않는 이유는 무엇입니까?
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();
}
을하지만 이상적으로 내가 사용하고자했을 훨씬 더 간단 : 파이어 폭스와 IE8에서 괜찮지 만, (IE7에서 작동하지 않습니다
function openPopup(popupDiv){
$("div[id$=PopupDiv]").hide();
$(popupDiv).show();
loadPopup();
}
그것이라고 처음 작동하지만, 함수가 호출이 새 컨테이너로 팝업을 열 경우, 제대로 렌더링되지 않습니다.
주셔서 감사합니다. 'Visible'은 '인라인'뿐 아니라 'IE7'에서 두 번째 기능의 숨기기/표시가 왜 효과가 있는지 잘 모르겠습니다. – DanB