Jquery Dynamically created(appendTo) Input renders disabled
<p>Im trying to create an input when the user click on a link.</p>

<p>This function here makes the magic:</p>

<pre><code>var editTitulo = function(id) {
    if($('#lis'+id).length &gt; 0) {
        var divTitulo = $('#lis'+id).find('div.titulo:first');
        var conteudo  = divTitulo.find('span').first().html().trim();

        divTitulo.html('');

        $('&lt;input type="text" id="caixaTitulo" /&gt;')
                      .val(conteudo)
                      .bind('keypress', function(e) {
                            var tecla = (e.keyCode ? e.keyCode : e.which);
                            if(tecla == 13) { //Enter 
                                alert('test: '+$(this).val());
                            }
                      })
                      .appendTo(divTitulo);
    }

}
</code></pre>

<p>It gets the content of a div, and put it inside the input, and replace that content with the input, making it editable.</p>

<p>The only problem is, the input is disabled, i cant even select what is inside of it.
Whats wrong?</p>

<p>I've tried to put this code on the input creation, but no good:</p>

<pre><code>.attr('disabled', false)
.attr('readOnly', false)
</code></pre>

<p>Btw, this input don't have a form</p>

<p>--- EDIT / SOLVED ---</p>

<p>Well, this div.id="lis.." is inside a sorted list (jquery-ui tool), and it uses this function:</p>

<pre><code>$('ul.lista-ordenada').disableSelection();
</code></pre>

<p>Apparently this function disable selecting inputs also.</p>

<p>But thanks for the responses, and sorry for wasting your time.</p>
