title: Call script when site is opened
body: <p>How to let a script start as soon as the site is loaded?
  I want the Website content i have to fade in, but didn't find an event for "when site open" yet. </p>
  
  <p>And basically, on the site you can switch betweent two "contents". Im only as far as the first "content" to fadeOut on button press, but wanted the things above to be done first. </p>
  
  <p>I tried to use a CSS animation, but then there is no fade effect, so the "content" disapears after a few seconds. Here the code i want to use:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function(){
      $("#button").click(function(){
          $("#main").fadeOut(200);
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>And that part of the code works just fine. So, can anybody help me or find another solution?</p>