title: depth of a child in the DOM
body: <p>Can I have any way to know which is the depth of a child based on a container. 
  Example: </p>
  
  <pre><code>&lt;div id="dontainer"&gt;
     &lt;ul&gt;
        &lt;li&gt;1&lt;/li&gt;
        &lt;li&gt;2&lt;/li&gt;
        &lt;li id="xelement"&gt;3&lt;/li&gt;
        &lt;li&gt;4&lt;/li&gt;
        &lt;li&gt;5&lt;/li&gt;
     &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>You should get 2 for "xelement" (taking as starting at 0). Knowing that the "li" are at the same level.</p>
  
  <p>Thanks</p>