I've ran into a problem with my webpage. I have a splash screen that is supposed to run when the page loads and it does that fine. I also have a loading screen that I want to run after splash screen, but I can't figure out how to make the splash screen run and then load the next line of code which would be the loading of the loading screen. How would I make the splash screen run and then the loading screen run? You can see the code below.
<script type="text/javascript">
$(window).load(function() {
$("#spinner").fadeOut( 3000 );
})
function SplashDone() {
document.getElementById('splash').style.display = 'none';
}
function Init() {
document.getElementById('splash').style.display = 'block';
setTimeout(function(){ SplashDone(); }, 3000);
}
window.onload = Init;
</script>
<body>
<div id="spinner">
<p>Loading</p>
</div>
<div id="splash">
<p>Splash</p>
<p><a href="#" onclick="SplashDone(); return false;">Skip</a></p>
</div>
So what I'm basically asking is how do I run as script after the page loads and then run another script after that script runs?
SplashDOne()