코딩공주
jQuery에서 $(document).height()가 너무 늦게 실행될때 본문
window.onload is not supposed to fire until the images are loaded. You could wait for that particular event. Note that $.ready is not window.onload; it happens before onload. I am not sure if you can bind the onload event with jQuery, but you probably can with the .bind method.
$(window).bind('load', function() {
alert($(document).height());
});
https://stackoverflow.com/questions/5673334/jquery-calculate-document-height-too-late
'So > 공부 : 코딩팩토리' 카테고리의 다른 글
메뉴 개수에 따라 가로 길이 지정되는 제이쿼리 (1) | 2019.12.05 |
---|---|
nicescroll.js 콘솔 버그 뜰때 (0) | 2019.05.16 |
[String] 특정문자열이 있는 위치(인덱스값) 반환하는 메서드 .lastIndexOf() (0) | 2019.02.28 |
[String] 특정 문자열을 포함하는지 확인하는 메서드 .includes() (0) | 2019.02.12 |
[String] 특정 문자열로 끝나는지 확인하는 .endsWith() (0) | 2019.02.12 |
Comments