Why does my code stops working when I add this? Simple JQuery
<pre><code>$('#insert_image').click(function(){
    $('#image').attr("src", "img/julia1.jpg");
});
</code></pre>

<p>First block of code stops working when I add the following:</p>

<pre><code>$('#insert_paragraph').click(function(){
    var text = $('#paragraph').val();
    $('#paragraph').replaceWith('&lt;p&gt;'text'&lt;/p&gt;');
});
</code></pre>

<p>The first block of code has nothing to do with the second, so why does it stop working? Also on the second block of code I'm trying to create a text are on which you can type a paragraph and when you click a button next to it, it replaces the textarea with a paragraph on the page.</p>
