If you’re using 1.4, and are looking for a descendant rather than a child as your find() example implies, there’s a has() method:
element2.has(element1).length > 0
If you’re using 1.4, and are looking for a descendant rather than a child as your find() example implies, there’s a has() method:
element2.has(element1).length > 0