thx Dimitar, the uid gives the absolut number of the element. I can't use it here. but nav_inner.indexOf(this) is the solution.
On 20 Apr., 14:07, Dimitar Christoff <[email protected]> wrote: > Why not use the .uid that mootools assigns as it deals with elements in > the DOM? > > alert(document.getElementById("foo").uid); // undefined > > var foo = $(document.body).getChildren(); // serialize - will assign > UIDS to returned elements and document.body. > > alert(document.getElementById("foo").uid); // eg, 4 > > http://jsfiddle.net/dimitar/JxMYG/ > > downside is, you redesign and put more nodes up the tree and the indexes > change, but you can use an anchor point of a parent, eg, > > nav_inner.getChildren(); > > Regards, > -- > Dimitar Christoff <[email protected]> > > blog:http://fragged.org/ twitter: @D_mitar
