Hi,
I have a DOM element, and wish to find its first descendant with a given
class.
Will the following work?
var myDomElement;
qx.bom.Collection.query(".MyTargetClass",myDomElement)[0];
Eg does the [0] guarantees that in the following case:
<div id="myElement>
<div class="MyTargetClass">
<div class="MyTargetClass">
</div>
</div>
</div>
the first <div class="MyTargetClass"> is returned, not the inner one?
I was used to Prototype's down() method which would guarantee me this.
According to the docs you should use Collection.query as an equivalent, but
the documentation examples show that you use the id of the element. I don't
always have an id for my elements, just a DOM reference.
Jean-Noel
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel