title: jQuery: position() on created element
body: <p>The following code creates a div at the bottom of the page:</p>
  
  <pre><code>var popup = $('&lt;div id="popup" /&gt;')
      .appendTo('body');
  </code></pre>
  
  <p>The following code causes it to position correctly once there.</p>
  
  <pre><code>$('#popup')
      .position({ my: 'left top', at: 'left bottom', of: $('#someDiv') });
  </code></pre>
  
  <p>But this code causes it to appear in the DOM but not be positioned anywhere (it is not visible, but it is in the DOM).</p>
  
  <pre><code>var popup = $('&lt;div id="popup" /&gt;')
      .appendTo('body')
      .position({ my: 'left top', at: 'left bottom', of: $('#someDiv') });
  </code></pre>
  
  <p>Is there a trick to being able to use jQuery position() on an item you are creating?</p>
  
  <p>Cheers,
  Craig</p>