is there any jquery that can handle page loader at the first time the webpage its click, my website consist of several jquery that will take time to view correctly so first time visitor will see it a bit messy, so i would like to cover it up with a loading animation untill all jquery files and css files finish loading from my webhosting server.
Some things might need to be tweaked a bit in the css, and in trying to have everything loads before the code runs, but hopefully this will give you somewhere to start.
Thanks for the reply, I’m not an expert in java coding, so I’m gonna need a bit more detail explanation hehe, so i just simply put this code on top of my other scripts ?
It might be better to make the element hidden in the css, and use javascript to display it immediately at the start of your page. This would mean that users who do not have javascript would not get stuck at a covered up page.
Covering everything up like this would indeed work, but please take care that people with javascript disabled (or running NoJS or the like) will never see your website, but just div covering everything up.
You should simply be able to create an element which covers your page so the user can’t see the loading happening behind it.
The trick will be timing the event which will hide this element. You can try simply do this in a $(document).ready function; which might be enough depending on how things in your site are layed out. I personally also try to define widths and heights of as many elements in a sites layout as possible, which prevents things from shifting around as the page loads.