I’m sure someone will change my title, but I liked it while it lasted.
Anyway, what the Hector does this do (as my seven-year-old would say)?
$('#id').find('> a')...
BTW, I get that $('#parent > .child') is the same as $('#parent').children('.child') (as explained here), not that I ever use it.
Using
> awithout a specified parent is actually deprecated syntax, since as you’ve discovered it has ambiguous semantics..find('> a')is actually equivalent to.children('a').From http://api.jquery.com/child-selector/
[ Remembering that
$(sel, context)is equivalent to$(context).find(sel)]