Having
var a = $("#HTMLiFRAME").contents().find('xxx'); //only reference not actual code
Pointing to the object:
<td>hi</td>
In a table:
<tr id="1">
<td>hi</td>
</tr>
<tr id="2"></tr>
<tr id="3"></tr>
<tr id="4"></tr>
How can I descend to
<tr id="3></tr>
using only methods like next(), offsetParents(), etc.
//ids or clases are not known
Your HTML is malformed (needs encapsulating table tags) and it’s screwing up any DOM traversal you might hope to do. Write the HTML code correctly, use a .parent() or .closest(‘tr’) to get from the cell to the row and then use a .next() or .nextUntil() to select the next row.
Working example:
http://jsfiddle.net/W3yqu/
No comment on the document.getElementById inside of a jQuery selector 😉