jQuery index of element within <body>
<p>I am trying to figure out a way of finding the index of an element within <code>&lt;body&gt;</code>of a document. So far I have only been able to find the index of an element within the  <strong>whole document</strong> using this code:</p>

<pre><code>$('div.css').click(function () {    
var mdivIndex;
mdivIndex = $(this).index('*');
console.log(mdivIndex);
});​
</code></pre>

<p><a href="http://jsfiddle.net/fWhEK/1/" rel="nofollow">FIDDLE HERE</a></p>

<p>To find the index within <code>&lt;body&gt;</code> do I have to use index() withour the asterisk? </p>

<p>Hopefully you can help me.
And once I find the index I assume that to select the element with that index I have to use:</p>

<pre><code>$('body').eq(mdivIndex)...
</code></pre>

<p>Right?</p>

<p>Thanks in advance for the help.</p>
