.ready
fires when the dom is ready (= all elements got parsed), it doesn't mean all resources/images got loaded.
what you need is to use :
$(window).load(function() {
// Run code
rotate = 0;
$(".preloader").fadeOut(250);
});
Pregunta
I am using the script below, for my loading screen. If you can notice, it hides the loading screen before the website has finished loading.
jQuery(document).ready(function hide_preloader() { rotate = 0; $(".preloader").fadeOut(250); });
Is there something I can do to fix this, that I am obviously overlooking?
Thanks
Solución
.ready
fires when the dom is ready (= all elements got parsed), it doesn't mean all resources/images got loaded.
what you need is to use :
$(window).load(function() {
// Run code
rotate = 0;
$(".preloader").fadeOut(250);
});