I want to show a Loading
image when the page is not loaded yet. Before loading the page it shows a blank white page
to the user. So, i want to remove the white blank space.
The page makes too many database hits, so it loads a bit slowly.
I've checked this post, but that doesn't work.
I've checked by adding <![CDATA[
infront of the script, as it stated in the blogpost.
That doesn't work.
Finally i've landed in Asking a Question, though it is a duplicate.
Here is my script finally.
<script src="../../Scripts/jquery-1.9.1.js" type="text/javascript"></script>
<script type="text/javascript">
// <![CDATA[
$(window).load(function () {
$("#divLoading").fadeOut("slow");
});
// ]]>
</script>
and in the body
<body style="background-color: white;">
<div id='divLoading'>
<div class="loading" align="center" id="divImageLoader">
<img src="../../ItemSelectorImages/ajax-loader_bluish.gif" alt="Loading..."/> Loading
</div>
</div>
</body>
The CSS of loading is:
.loading
{
font-family: Arial;
font-size: 10pt;
padding:20px;
position: fixed;
background-color: #ffffff;
z-index: 99999;
border-radius:5px;
}
What was wrong with my code ? Can someone point out or give working solution.
Cheers !!!
Karthik