How do I switch a span tag's text to in input with the text as the input value?
<p>I'm trying to essentially switch from span to an input while keeping the text from the span and making that the value of the input...</p>

<pre><code>$('#container').find('&lt;span /&gt;').each(function() {
  $(this).replaceWith($("&lt;input /&gt;").val(this.text));
});​
</code></pre>

<p>that's what I tried and couldn't get it to work?</p>
