This is my simple loading gif JS:
$(document).ready(function() {
$(window).load(function(){
$('.doc-loader').fadeOut('slow');
});
Class for loading gif div:
.doc-loader{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: visible;
background: #ffffff url('../images/gears.gif') no-repeat center center;
z-index: 100000;
text-align: center;
padding-top: 535px;
}
If the user has Javascript disabled, the users cannot access the page because the loading gif does not go away (in the CSS the height/width of the div is 100%)
Is there a way to only show my preloader div if the user has Javascript enabled?