System: Windows NT WINDOWS18 10.0 build 17763 (Windows Server 2016) AMD64 | User: IWPD_3544(appclien)

Path: D:\Inetpub\vhosts\appclients.in\fruits-vegitables.nmvm.org

[Back to List]
<script>
$(function() {
    $(".preload").fadeOut(2000, function() {
        $(".content").fadeIn(1000);        
    });
});
</script>
<style>
.content {display:none;}
.preload { width:100px;
    height: 100px;
    position: fixed;
    top: 50%;
    left: 50%;}
</style>

<div class="preload"><img src="http://i.imgur.com/KUJoe.gif">
</div>
<div class="content">I would like to display a loading bar before the entire page is loaded. For now, I'm just using a small delay:

$(document).ready(function(){
    $('#page').fadeIn(2000);
});
The page already uses jquery.

Note: I have tried this, but it didn't work for me:

loading bar while script runs

I also tried other solutions. In most cases, the page loads as usually or the page won't load/display at all.

Thank you for any help.</div>