View Full Version : DOM Query Question

26 Nov 2007, 4:15 PM
Given the HTML below, how can I get direct descendents of <TD> tag skipping the #text nodes.

<tr class="Footer">
<td colspan="3">
<img src="First.gif" border="0">
<img src="Prev.gif" border="0">1 of 3
<a href="MyTest.asp?Page=2">
<img src="../Styles/CoffeeBreak/Images/Next.gif" border="0">
<a href="MyTest.asp?Page=3">
<img src="../Styles/CoffeeBreak/Images/Last.gif" border="0">

In IE 7
var footer = el.query('tbody tr[class$=Footer] td>*'); gives me direct descendents while in FF the #text nodes are included. Is my syntax correct for the query?

27 Nov 2007, 4:32 AM
It could be because your image tags aren't valid (you're never closing them).