 <p>Yes. Something like this:</p> <pre><code>function whereami(elem) { var par = elem.parentNode, sibs = par.children, l = sibs.length, i; for( i=0; i&lt;l; i++) { if( sibs[i] === elem) return i; } throw "I am invisible!"; } </code></pre>