Javascript hide div (is:empty) issue
<p>Have some code to hide a div, if it's contents are empty. This SHOULD work...its' worked before. Am I missing something obvious here? The div class = "msgalert"</p>

<pre><code>$(document).ready(function () {
    if ($('.msgalert').is(':empty')) {
        $(".msgalert").css({'display':'none'});
    }
});
</code></pre>

<p>The corresponding CSS is:</p>

<pre><code>.msgalert { border: 1px solid #eac572; background-color: #ffe9ad; }
</code></pre>

<p>Please help! Thanks :)</p>
