I have displayed a loading bar before the entire page is loaded on my website.
Here is the js which i am using
JsBin demo
Now the problem is when some one opens the web page , black background (css) appears and after 2-3 seconds loading bar shows the loading. Though this is the first script which loads on the website.
Why loading bar gets delay. How can i load it dynamically ?
This is my website . Script name is javatest.js
Sorry if i missed anything , i am just a newbie