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()
Checking for (this).parents().index(someDiv) >= 0, as @Gareth suggests, will work just fine.
(this).parents().index(someDiv) >= 0
However, using the jQuery ancestry plugin is way faster / more efficient.