title: jquery append element position always 0
body: <p>I'm using jquery's append() method, to add elements (div) to parent element (div as well).</p>
  
  <p>When calling the offset function of the parent div, i'm getting it's relative position just fine. When i'm calling the child element, i'm getting 0 as its relative position (top and left)</p>
  
  <p>Anyone have any idea how to solve this problem? How can I get the position of dynamically added div?</p>
  
  <pre><code>var $grid = $('#myDiv');
  $grid.empty()
  $grid.append("&lt;div id="newDiv"&gt;...")
  console.log($("#newDiv").position())
  </code></pre>
  
  <p>Output: top: 0 left: 0</p>
  
  <p>(it shows me the current scroll bar offset from the top)</p>