jQuery putting content of a paragraph in a textarea
<p>I tried to do this for replacing the content of a paragraph into a text area.</p>

<pre><code>function edit() {
    var wdith = $("p").css('width')
    $("p:first").replaceWith("&lt;textarea class='edit'&gt;" + $("p:first").text() + "&lt;/textarea&gt;")
    $(".edit").css("width", wdith)
}
$("#replace").click(edit);
</code></pre>

<p><a href="http://jsfiddle.net/kritya/z9xCm/" rel="nofollow">Demo</a></p>

<p>But it doesnt goes correctly.<br />
There are spaces before and after the text.<br />
How do i fix it ?</p>
