Check if an element is in a jQuery set
<p>I have an element, and a jQuery set. I would like to check if the element is inside the jQuery set. I need a condition like this.</p>

<pre><code>if ($someUL.find("&gt; li &gt; a").contains(myElement)) {
  ...
}
</code></pre>

<p>Here, the <code>contains</code> method does not exist, I used it to demonstrate my goal. I'm aware of several methods similar to this, like <code>has</code>, <code>is</code>, <code>$.contains</code>, but all of them has different meaning.</p>