$("div[id^='BlockHeading']").live("click", function() {
var text = $(this).text().toString();
if ($(this).next().css("display") == "none") {
$(this).empty();
$(this).html("" + text + " <img src='../img/109041_25936_16_chevron_collapse_icon.png' height='12' width='12' style='float:right'>")
iframeresize();
$(this).focus();
} else {
$(this).empty();
$(this).html("" + text + " <img src='../img/109041_25936_16_chevron_collapse_iconDown.png' height='12' width='12' style='float:right'>")
iframeresize();
$(this).focus();
}
jQuery(this).next(".content").slideToggle(100);
});
이벤트가 발생한 후 IFRAME
의 크기를 변경하려고합니다. 위의 예는 그러한 이벤트 중 하나를 보여줍니다. 함수를 호출하기 전에 또는 함수 자체 내에서 alert()
을 실행하면 호출되는 함수 iframeresize()
에서 문제가 발생하지만이 아니면 다음과 같은 경우에는 작동하지 않습니다 (방화 거리의 debug-window
). 현재 ...경고()를 제거하면 스크립트 실행이 중지됩니다.
나는 무엇을 놓치고? iframeresize()
에 대한
편집 코드 :
function iframeresize() {
$("#frame1", parent.document).css("height", $("#form1").height() + 100);
$("#container", parent.document).css("height", $("#form1").height() + 100);
}
제 추측은 타이밍입니다. 삽입하려는 HTML 내부에서 'iframeresize'를 호출 해 볼 수 있습니까? – sje397
확인. 나도 그 것을 시험하게 해주세요. .. – user1666443
asing하는 것에 대해 유감스럽게 생각한다. 그러나 나는 그것을 어떻게한다. .. ??? – user1666443