Once the CSS div is loaded, progress bar will be replaced by that CSS div.
CSS div is a dynamic one, it takes some time to fetch the data to be displayed and hence I want to show a Loading bar before CSS is loaded.
<div id="'+levelDivId+'" class="mainContainerLevel" style="display:none">
<div class="nav-header-top">
// code which will be fetching my data
</div>
I want to load a progress bar before
<div id="'+levelDivId+'" class="mainContainerLevel"> </div>
Progress bar will be displayed for 2-3 seconds then this div will be displayed.
I need a javascript for achieving this.
Please Help.
Problem Solved, this is how:
We have a mainContainer div which holds everything.
First we load the "loading" div
$("#mainContainer").append("<div id='loading_MainMenu' class='mainContainerl' style='display: block;'>
<p>Loading Data....</p> </div>");
//Data div which takes some time to fetch the data to be displayed comes here
We hide the "loading" div before displaying the data div
$("#loading_MainMenu").hide();
Now we append the Data div to mainContainer
$("#mainContainer #"+DataDiv).append("</div> </div>");
Thats it.