I currently have a CSS preloader implemented on my WordPress site, but I am facing an issue where the preloader hides the entire page instead of just a part of the content that I want to hide. Specifically, I would like to hide only the main content section while keeping other elements visible such as the site title, menu, and footer.
Within the header.php file:
https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js
$(window).load(function() {
$(".cssload-loader").delay(1300).fadeOut();
$(".preloader").delay(1400).fadeOut("slow");
})
.preloader {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #fff;
z-index: 100501;
height: 100%;
width: 100%;
}
<!-- More CSS styles omitted for brevity -->
@keyframes cssload-rotate135 {
<!-- Animation keyframes definitions -->
}
@-moz-keyframes cssload-rotate135 {
<!-- More animation keyframes definitions -->
}
<div class="preloader">
<div class="cssload-loader">
<!-- HTML structure for loader -->
</div>
</div>
Feel free to visit my site to view the page code
I am considering implementing a script to display the site title and menu while hiding the content section, or potentially adjusting the CSS styles to achieve the desired effect. Any suggestions are welcome!