Why does .fadeOut() not work, but .hide() works fine when hiding appended div in jquery?
<p>I want to show a div and remove it after few seconds. It's just that easy.
So in my html I've got: <code>&lt;div id="msg"&gt;&lt;/div&gt;</code></p>

<p>And I've got this function:</p>

<pre><code>function showWarning(text) {
            $('&lt;div&gt;'+text+'&lt;/div&gt;').appendTo('#msg').hide().fadeIn('fast').delay(1000).queue(function() {
                $(this).fadeOut();
        });
    }
</code></pre>

<p>I can't find any way to make this work. <code>fadeOut()</code> is called but nothing happens on screen.
If I change <code>fadeOut()</code> to <code>hide()</code> it works fine. However... If I try <code>hide(500)</code> then it won't work.</p>

<p>I assume this is something trivial - beginner mistake - but I can't find it.</p>

<p>Thanks</p>
