0
Hello, everybody!
I don’t know anything about javascript, but I would like to change this js code so that the contents of a particular div only appear after loading it and not after loading the entire page.
I would like you to div ".preloader" is displayed while the div ".content" is loaded. With the load complete, the div ". preloader" disappears and the div ". content" is displayed, while the browser continues to load the scripts that are before the close of the "body".
I don’t want to use jQuery at the head, so I can optimize the loading time of the content and it is only loaded after the page display.
In other words, it is a preloader of a div and not of the full page.
I would also like you to div ".preloader" shows a progress bar based on div loading ".content" only with Javascript and CSS.
<html>
<head>
<script>
$(window).load(function() {
$('.preloader').fadeOut('slow', function() {
$(this).remove();
});
});
</script>
</head>
<body>
<div class="preloader"></div>
<div class="conteudo">
<header></header>
<main>
<section></section>
<section></section>
<section></section>
<section></section>
</main>
<footer></footer>
</div>
<script src="jquery"></script>
<script src="config"></script>
<script src="wow"></script>
</body>
</html>