How to make the LP section and the pictures that were loaded into them after the cap?

There is a landing page, there is a preloader for it:

html

<div id="loader"> <div id="loaderInner"></div> </div> 

Js:

 $(window).**load**(function() { $("#loaderInner").fadeOut(); $("#loader").delay(400).fadeOut("slow"); }); 

// after it goes

 $(function() { *//много другого кода =)* }) 

The preloader is turned off only after all the content is loaded, and not just the header, changed the window in the sample to the class of the header - zero effect, and load does not occur at all, does not remove the preloader animation, it works only if you replace it with ready. Link to the whole js code: http://codepen.io/junior-web-dev/pen/WpWKoN?editors=1010

  • The question is incomprehensible. Sample code? - labris
  • or how the queue of loading images can be managed? so that the background is loaded first in the header, and then all the other pictures on the page) - junior-web-dev
  • one
    A <div id = "loader"> can not be put after the header in html? And then <element onload = "myFunction"> </ element> - labris

0