Question: Question:
Many DOM elements are included in the pages of the created website, and the page display is slow. In addition, there is a symptom that the elements relaid out by JavaScript etc. are broken.
How can I not display the page until all the elements are loaded and display the page when all the elements are loaded?
Answer: Answer:
Although it is the js part, it is written in a unified way with jQuery.
$(function(){ // window.loadと同等、DOMの初期化後に呼ばれる
$('#loading').fadeOut(300);
$('#loaded').fadeIn(300);
});
I think it would be smarter to write like this.