Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

코딩공주

jQuery에서 $(document).height()가 너무 늦게 실행될때 본문

So/공부 : 코딩팩토리

jQuery에서 $(document).height()가 너무 늦게 실행될때

소수소수 2019. 5. 15. 10:39

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

Comments