Focus on an input after creating it
<p>I would like to substitute a text input for a password input after clicking on the first one, my code creates it but it doesnt have focus on the new input, I would like to change this.</p>

<p>Here's my code.</p>

<pre><code>$('.input_center input:text').click(function(){
var padre = $(this).parent();
                var passInput = $(document.createElement("div"));
                passInput.html('&lt;input type="password"&gt;');
                padre.append(passInput);
                passInput.focus();
                $(this).remove();
});
</code></pre>

<p>That passInput.focus() is not doing the focus, so I dont know how to get it done.</p>
