the loader shows after the screen deflection and then complete body shows. the jquery code takes time to load the complete body. I have tried all things but all in vain.
$(window).load(function () {
$(".preload").fadeOut(2000, function () {
$(".profile").fadeIn(1000);
});
});
.preload {
width: 50px;
height: 50px;
position: fixed;
top: 50%;
left: 50%;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="preload">
<img src="http://i.imgur.com/KUJoe.gif">
</div>