Show div after 2 seconds of page load
<p>I am currently trying to show a div 2 seconds after the page is loaded. I can successfully do the reverse by hiding the div two seconds after the page loads. The issue is that nothing occurs and the div stays hidden. How can I properly show a div after two seconds of page load? Extra: mean while the two seconds are running show an ajax loading gif and then fade in the div</p>

<pre><code>&lt;script type = "text/javascript"&gt;  
$(window).load(function() {
    setTimeout(function() {
        $("#contentPost").show('fadeIn', {}, 500)
    }, 2000);
});
&lt;/script&gt;
</code></pre>

<p><strong>html/css</strong></p>

<pre><code>&lt;style&gt;
.contentPost { display:none;}
&lt;/style&gt;

&lt;div class="contentPost"&gt;
 &lt;h2&gt;Hi there&lt;/h2&gt;
&lt;/div&gt;
</code></pre>
