jQuery won't fade in span <p>I have some trouble fading in a span after hiding it and replacing it's contents.</p> <p>Here is my html before replacing it</p> <pre><code>&lt;span id="replace_with_editor"&gt; &lt;a id="edit_button" class="btn btn-success" href="thread.php"&gt;Post ny tråd&lt;/a&gt; &lt;/span&gt; </code></pre> <p>Here is my jQuery code</p> <pre><code>replace_with_editor = $('#replace_with_editor'); $('#edit_button').click(function(e) { e.preventDefault(); replace_with_editor.hide(); replace_with_editor.html('&lt;form role="form" method="post" action="process/submit_thread.php"&gt;&lt;div class="form-group"&gt;&lt;label for="Title"&gt;Tittel&lt;/label&gt;&lt;input id="thread_title" name="thread_title" type="text" class="form-control" placeholder="Skriv en tittel for tråden."&gt;&lt;/div&gt;&lt;div class="form-group"&gt;&lt;label for="Svar"&gt;Tråd&lt;/label&gt;&lt;textarea id="thread_editor" name="thread_content" rows="10" class="form-control"&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;input type="hidden" value="category_id" name="category_id"&gt;&lt;input type="hidden" value="forum_id" name="forum_id"&gt;&lt;button type="submit" class="btn btn-success"&gt;Post tråd&lt;/button&gt;&lt;/form&gt;'); replace_with_editor.fadeIn(2000); }); </code></pre> <p>For some reason when i try this script, the new content shows up but the fadeIn() doesnt work, it shows up instant.</p> <p>Any guess what i am doing wrong? Oh and the jQuery is not nested because of debugging. Any help is much appreciated.</p>