How can I changing text to input and geting input value with jQuery?
<p>I have following problem. After clicking on text I want to changing this text with input. After insert value in this input and press ENTER I want to returning input value.</p>

<p>I using this code but not worked after click enter :( :</p>

<pre><code>$(document).ready(function() {

    $('.qty_new').click(function(){
        $(this).replaceWith("&lt;input class='newVal' value='' /&gt;");
        return false;

        $('.newVal').keypress(function(e){
            var qty=$(this).val();
            var code =null;
            code = (e.keyCode ? e.keyCode : e.which);
            if (code == 13){
               alert('ratata');
            } 
        });
    });


    &lt;span class='qty_new'&gt;100&lt;/span&gt;
</code></pre>

<p>Thanks in advance !</p>
