There is a script. Which hides the entire contents of the page before the document is fully loaded, the question is how do I get the "background1" to load without waiting for the loading of "background2" and the rest of the page content, but only after fully loading myself.

window.onload = function() { var div4 = document.querySelector('.hide4'); div4 && div4.classList.remove('hide4') var div5 = document.querySelector('.hide5'); div5 && div5.classList.remove('hide5') }; 
 .hide4 { display: none; } .hode5 { display: none; } 
 <div class="hide4"> <div class="background1"> ..content </div> </div> <div class="hide5"> <div class="background2"> ..content2 </div> </div> 

  • Well, so display: none; take it all. - Jean-Claude
  • where to remove? for more details if you can - hovdev
  • if you remove the display: none; with background1, then it will load "I find" and not after a full load, I need as described above so that background1 loads after a full load of itself - hovdev

0