Prototype use
$('thetable').childElements()[0].childElements().invoke('firstDescendant');
All this cascades. The first table $ ('tabletable') gets the table. I know you need a minimal DOM, but obviously you will need to identify the table.
The second one takes all the children as an array and captures the first, which is the tbody element.
Then it captures the children of these elements, which provide an array of table rows.
The last call calls () calls a function for each element in this array. In this case, firstDescendant.
Paulo Feb 20 '09 at 22:45 2009-02-20 22:45
source share