I\'d like to check ancestry using two jQuery objects. They don\'t have IDs, and are only going to be available as jQuery objects (or DOM nodes if you called get()
get()
Would you not get the result you want from simply using a CSS selector?
$( '#div a' ).click( function() { ... } );