title: Delaying JavaScript code
body: <p>On my webpage I have a piece of javascript that allows a div to fade in</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
  
          $('#page_effect').fadeIn(10000);
  
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>But, I would like the same div to fade out. I have the code for the fade out but I'm wondering how I would delay the javascript code from running, for about 140 seconds</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
  
          $('#page_effect').fadeOut(140000);
  
      });
  &lt;/script&gt; 
  </code></pre>