title: jQuery dynamic input field focus
body: <p>I want to add an input field  dynamically to my page using the following jQuery:</p>
  
  <pre><code>var inputNode = "&lt;input id='inputNode' class='tiContent' type='text'
      placeholder='text input...'/&gt;";
  $("div").append(inputNode);
  </code></pre>
  
  <p>and after doing so, I want the input field to have focus with blinking text cursor, so I want to type in it right after creation.</p>
  
  <p>Could someone please tell me how can I do this?</p>
  
  <p>I've tried calling </p>
  
  <p><code>$(inputNode).focus()</code> </p>
  
  <p>and also have tried </p>
  
  <p><code>$(inputNode).trigger('click')</code> </p>
  
  <p>but none of them worked. I can type into the field after clicking in it, but as I've said I want to type without any interaction immediately.</p>