I have a bit of code that acts as a preloader that displays until all JS has loaded. The only problem is I see the preloader appear over the top of the content coming in to the page.
How do I adjust the code below to fade out the '#loading-mask' div, pause with a blank screen for .5 of a second then fade in my page content?
The primary goal is to stop the two from overlapping
Here's my code:
$('#loading-mask').fadeOut();