title: Show splash screen when page loads, but at least for x seconds
body: <p>I have a div with a splashscreen element. This element will be hidden on page load. However, I also want to make sure the splash screen is shown for at least x seconds.</p>
  
  <p>I know this is not all supposed to be formatted as code but the auto formatter made me do it.</p>
  
  <p>To use logic:
  Show splash screen for at least x seconds.
  If the page is loaded by that time hide this div.</p>
  
  <p>This code is the part where it hides the div as soon as the page is loaded.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"&gt;
              $(document).on("pageload",function(){
                  $('#splashscreen').hide();
              });
          &lt;/script&gt;
          &lt;title&gt;Thomas Shera&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id="splashscreen"&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is the part where I show the splash screen for x seconds.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"&gt;
              $(function() {
                  $("#div2").show().delay(x).hide();
              });
          &lt;/script&gt;
          &lt;title&gt;Thomas Shera&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id="splashscreen"&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>So basically I am asking, how can I combine these two jquery codes?</p>
  
  <p>EDIT: I am now trying this code but something still doesn't work.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"&gt;
  
      $(document).on("pageload",function(){
                 $('#splashscreen').hide();
  });
  
  $(function() {
       $("splashscreen").show().delay(1000).hide();
   });
  
  &lt;/script&gt;
  
  &lt;style type="text/css"&gt;
    @import url(https://fonts.googleapis.com/css?family=Cutive+Mono);
  
    .skills
    {
      font-family: 'Cultive Mono', monospace;
      font-size: 400pt;
    }
  
  &lt;/style&gt;
  
  &lt;title&gt;Thomas Shera&lt;/title&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id="splashscreen"&gt;
      &lt;p i="skills"&gt;
        Javascript  Technical writing   VBA scripting with Microsoft Office   Excel
        Entrepreneur
      &lt;/p&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>